术语
🌐 Terminology
绑定
🌐 Binding
在作用域内被赋值/绑定的值。
🌐 A value being assigned/bound within a scope.
装订类型
🌐 Binding type
绑定类型:导入值、赋值(let/const/var)、导出值、函数/类声明、函数/方法参数等。
🌐 The type of the binding: imported value, assigned value (let/const/var), exported value, func/class declaration, func/method arguments, etc.
范围
🌐 Scope
一个可以存在绑定的代码块。代码块是任何被 {} 包围的代码,例如类、函数、方法、回调、if/else 等。作用域有层级关系,父作用域可能有子作用域(不一定),子作用域属于父作用域。如果子作用域中的绑定与父作用域中的绑定同名,子作用域中的绑定会覆盖父作用域中的绑定。
🌐 A block in which bindings can exist. A block is any code surrounded with {}, such as classes, functions, methods, callbacks, if/else, etc. Scopes have a hierarchy, with parents having children (not always), and children belonging to a parent. Bindings in a child shadow those in a parent if they have the same name.
范围标志
🌐 Scope flags
关于当前作用域的元数据(非继承层次作用域):函数、构造函数、顶层(程序)等。
🌐 Metadata about the current scope (not inherited hierarchy scope): function, constructor, top-level (program), etc.
符号
🌐 Symbol
一个绑定封装器,包含对当前源文本中绑定变量的每个使用/调用位置的引用。符号会按扫描顺序分配一个 ID,每个引用通过该 ID 指向符号。
🌐 A binding wrapper with references to each usage/call site of the bound variable within the current source text. A symbol is assigned an ID in the order they are scanned, and reach reference points to the symbol by that ID.
信号旗
🌐 Symbol flags
有关符号/绑定的元数据。
🌐 Metadata about the symbol/binding.
参考
🌐 Reference
符号引用是符号(进而是绑定)的使用,并按扫描顺序分配一个 ID。每个引用都会被标记为只读、可写或两者兼有。
🌐 A symbol reference is the usage of a symbol (and in turn a binding), and is assigned an ID in the order they are scanned. Each reference is flagged as read, write, or both.
跨度
🌐 Span
节点在源文本中的起始/结束偏移量。
🌐 The start/end offset of the node within the source text.
