Crate roan_engine

Source

Re-exports§

Modules§

Macros§

Structs§

  • Represents an access expression in the AST. It includes accessing a field or indexing into a collection.
  • Represents an assignment expression in the AST. An assignment binds a value to a variable.
  • Represents the Abstract Syntax Tree (AST) for the language.
  • Represents a binary operator in the AST.
  • Represents a binary expression in the AST. A binary expression consists of two operands and an operator (e.g., a + b).
  • Represents a block of statements enclosed in braces in the AST.
  • Represents a function call in the AST. It consists of a function name (callee) and a list of arguments.
  • Represents a diagnostic message, which includes information about an error or warning and can be pretty-printed to the console.
  • Represents an else or else if block in the AST.
  • Represents a function declaration in the AST.
  • Represents a function parameter in the AST.
  • Represents a function type annotation in the AST.
  • Represents an if statement in the AST.
  • Represents a variable declaration (let statement) in the AST.
  • The lexer is responsible for converting the source code into a list of tokens.
  • Represents a literal expression in the AST. It consists of a token and a specific literal value (e.g., integer, string).
  • Represents an object expression in the AST.
  • Represents a parenthesized expression in the AST. Parenthesized expressions are used to override operator precedence.
  • A parser that converts a list of tokens into an Abstract Syntax Tree (AST).
  • Represents a return statement in the AST.
  • Spread operator for variadic arguments.
  • Represents a struct constructor expression in the AST.
  • Represents a span of text between two positions, including the literal text.
  • Represents a then-else expression in the AST.
  • Represents a try statement in the AST.
  • Represents a type annotation in the AST.
  • Represents a unary operator in the AST.
  • Represents a unary expression in the AST. Unary expressions operate on a single operand (e.g., -a).
  • Represents a use statement for importing modules or items in the AST.
  • Represents a variable in the AST. A variable refers to a named entity in the program.
  • Represents a collection of expressions as a vector. Used to handle lists of expressions, such as arrays or argument lists.

Enums§

  • Enum representing the kind of access in an access expression.
  • Enum representing the associativity of a binary operator.
  • Enum representing the various binary operators in the language. Binary operators are used in binary expressions (e.g., a + b).
  • Enum representing an expression in the AST. Expressions include literals, binary operations, unary operations, and more.
  • Enum that defines the possible literal types in the language. Literals are constant values such as numbers, strings, and booleans.
  • Represents a statement in the AST.
  • Enum representing unary operator kinds (e.g., -, ~).

Traits§

  • A trait to get the source code position (span) of a node in the AST.

Functions§

  • Prints a diagnostic message based on the provided error. The function matches the error type with corresponding diagnostics and logs it prettily.