diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-18 10:08:40 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-18 10:08:40 +0100 |
| commit | f1cd9657920232dbc7fa792ed2def4e8b34b19cd (patch) | |
| tree | 9916141227e9edb91f729e524954f0749ac2216f /hobgoblin | |
| parent | d4a22c167efa7707d75fb952e5e98ec95b0c7dfd (diff) | |
Add equal and not equal operators to Rust AST
Diffstat (limited to 'hobgoblin')
| -rw-r--r-- | hobgoblin/src/output/lang/rust/ast.hob | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hobgoblin/src/output/lang/rust/ast.hob b/hobgoblin/src/output/lang/rust/ast.hob index e0f1061..001972c 100644 --- a/hobgoblin/src/output/lang/rust/ast.hob +++ b/hobgoblin/src/output/lang/rust/ast.hob @@ -123,6 +123,7 @@ struct RustLetStatement { sum RustExpression { variant RustArrayRepeatExpression; + variant RustBinaryExpression; variant RustBlockExpression; variant RustBoolLiteral; variant RustCallExpression; @@ -141,6 +142,17 @@ struct RustArrayRepeatExpression { field lengthOperand: RustExpression; } +struct RustBinaryExpression { + field operator: RustBinaryOperator; + field left: RustExpression; + field right: RustExpression; +} + +enum RustBinaryOperator { + variant equal; + variant notEqual; +} + struct RustBlockExpression { field statements: List[RustStatement]; field finalOperand: Option[RustExpression]; |
