Expand description
Abstract Syntax Tree types representing parsed Technetium programs
Structs
An attribute expression without a function call
(i.e., not a method call): person.name
A literal dictionary given in code: {"a": true, "b": 123}
A string preceded by ~
, used to substitute variables into a string
A function call, not attached to a particular parent
(i.e., not a method call): print("123")
A name given as part of an expression: print
An expression indexed with square brackets:
my_list[i + 2]
A list of expressions surrounded by square brackets
in code: [1, 2, "hello"]
A method call on an expression: [1, 2].length()
Some kind of post/pre-increment/decrement attached
to a expr: x++
or --a[0]
A list of expressions surrounded by brackets
in code: {1, 2, "hello"}
A line beginning in $
to make a shell statement
An expression with a slice attached to it:
hello[1:3]
or hello[10::-1]
A list of expressions surrounded by parenthesis
in code: (1, 2, "hello")
Enums
A type of expression that can be on the left of an assignment: either a variable, an identifier, or an indexed expr
A possible additional clause on an if statement
Any kind of literal written in code. Each variant represents a different kind of literal
Traits
Common functionality for AST expression nodes