summaryrefslogtreecommitdiff
path: root/hobgoblin/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-14 20:51:50 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-14 20:51:50 +0100
commit7b4c0375059aaaf06cb8b8ccebebfbc0d20e01f2 (patch)
tree8b95ee817e6523d1dc9ff53441ce71beb066fd10 /hobgoblin/src
parent6f7cc0826ffbcb6ab442d91da7b5385208f2af23 (diff)
Add field 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 9c29cab..970ae7f 100644
--- a/hobgoblin/src/output/lang/rust/ast.hob
+++ b/hobgoblin/src/output/lang/rust/ast.hob
@@ -117,6 +117,7 @@ sum RustExpression {
variant RustBlockExpression;
variant RustBoolLiteral;
variant RustCallExpression;
+ variant RustFieldExpression;
variant RustPathInExpression;
}
@@ -134,6 +135,11 @@ struct RustCallExpression {
field args: List[RustExpression];
}
+struct RustFieldExpression {
+ field containerOperand: RustExpression;
+ field fieldName: RustIdentifier;
+}
+
// == Types ==
sum RustType {