14 Matching Annotations
- Jan 2024
-
gitlab.com gitlab.com
-
By abstracting code away from "Files" and "Lines" we can offer more nuanced views like "Repeated Code Blocks" that could be refactored.
-
A user wants to comment on a single parameter name in a function. It is highlighted as a unique part of the syntax tree, and they're not happy with the particular name the author of the MR chose. Problem: The user can only comment on the entire line, because "lines" are considered the most fundamental building block in our Diffs UI.
-
- Dec 2023
-
mathspp.com mathspp.com
-
Abstract syntax tree
It's an abstract syntax tree because it is a tree representation that doesn't care about the original syntax we used to write the operation. It only cares about the operations we are going to perform.
-
The four parts of our program
- Tokenizer takes source code as input and produces tokens;
- Parser takes tokens as input and produces an AST;
- Compiler takes an AST as input and produces bytecode;
- Interpreter takes bytecode as input and produces program results.
-
- Dec 2022
-
www.zhihu.com www.zhihu.com
-
编译原理中的抽象语法树(AST)为什么而存在?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
操作 AST 树都有哪些标准算法,各自的优缺点是什么?
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
请问Babel能将ES5转成ES6吗?
Tags
Annotators
URL
-
- Sep 2022
-
github.com github.com
-
the AST version of the code is vastly superior IMHO. The knowledge about what constitutes an access modifier is already encoded in the system so it makes more sense to just call the method to test the type of node. The regexp solution may be expedient, but it's not as resilient to change -- if new access modifiers are added in the future it's very likely this code won't be updated, which will be the source of a bug.
-
- Aug 2021
-
www.botsquad.com www.botsquad.com
- Sep 2020
-
github.com github.com
- Jan 2020
-
jpospisil.com jpospisil.com
-
Let’s take a look at one more visitor, Arel::Visitors::Dot. The visitor generates the Graphviz’s Dot format and we can use it to create diagrams out of an AST.
-
-
buildingvts.com buildingvts.com
-
Arel’s ComposabilityInternally Arel functions on AST nodes and every time an Arel method is made, the nodes in the AST will be modified accordingly. This is an important nature of how Arel works — composability, so that it’s able to build queries in a flexible way. With this abstract representation, we are able to safely add different filters and operations to the same query and even combine queries regardless of its order. Arel is able to generate the correct SQL query from it.
-
-
-
Arel is a SQL AST (Abstract Syntax Tree-like) manager for Ruby. It allows us to write complex SQL queries in a semantic, reusable fashion. Arel is "framework framework"; it's designed to optimize object and collection modeling over database compatibility. For example, Active Record is built on top of Arel.
-
- Nov 2019