summaryrefslogtreecommitdiff
path: root/hobgoblin/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-26 00:24:04 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-26 00:24:04 +0100
commit27dd47f88f1bfea84752d7bf30ef2f7ef3c8cc8e (patch)
tree006fdca57c323dfcc706e3527066310cd267e1f5 /hobgoblin/src
parent35e5a39b044f5916fb528ec1c80d05c05e4389c4 (diff)
Add index expressions to Rust AST
Diffstat (limited to 'hobgoblin/src')
-rw-r--r--hobgoblin/src/output/lang/rust/ast.hob6
1 files changed, 6 insertions, 0 deletions
diff --git a/hobgoblin/src/output/lang/rust/ast.hob b/hobgoblin/src/output/lang/rust/ast.hob
index 2a2bc26..2a4aa41 100644
--- a/hobgoblin/src/output/lang/rust/ast.hob
+++ b/hobgoblin/src/output/lang/rust/ast.hob
@@ -130,6 +130,7 @@ sum RustExpression {
variant RustClosureExpression;
variant RustFieldExpression;
variant RustIfExpression;
+ variant RustIndexExpression;
variant RustIntegerLiteral;
variant RustIteratorLoopExpression;
variant RustMatchExpression;
@@ -196,6 +197,11 @@ struct RustIfExpression {
field ifFalse: RustBlockExpression;
}
+struct RustIndexExpression {
+ field indexed: RustExpression;
+ field index: RustExpression;
+}
+
struct RustIntegerLiteral {
field value: Int64;
field type: Option[RustIdentifier];