roan_engine::ast

Module expr

Source

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 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 function call in the AST. It consists of a function name (callee) and a list of arguments.
  • 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.
  • Spread operator for variadic arguments.
  • Represents a struct constructor expression in the AST.
  • Represents a then-else expression 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 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.
  • Enum representing unary operator kinds (e.g., -, ~).