Crate starlark_syntax

source ·
Expand description

Starlark AST.

Re-exports§

Modules§

  • Starlark call stack.
  • A data structure for tracking source positions in language implementations The CodeMap tracks all source files and maps positions within them to linear indexes as if all source files were concatenated. This allows a source position to be represented by a small 32-bit Pos indexing into the CodeMap, under the assumption that the total amount of parsed source code will not exceed 4GiB. The CodeMap can look up the source file, line, and column of a Pos or Span, as well as provide source code snippets for error reporting.
  • Our string operations (indexing) are O(n) because of our current representation. There are plans afoot to change that, but in the meantime let’s use fast algorithms to make up some of the difference.
  • The AST of Starlark as AstModule, along with a parse function.

Type Aliases§