diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-09-27 20:28:57 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-09-27 20:28:57 +0100 |
| commit | 130b77ede3cce7d9b623174977429f2240e9fc11 (patch) | |
| tree | c220d299f076ee57773422111e29d039824973f6 /src/main/java | |
| parent | 059d6276a4d2ef23672adb009e633a06f3603a8c (diff) | |
Define declared variables for structs
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/typechecker/DeclaredVariables.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/shedlang/compiler/typechecker/DeclaredVariables.java b/src/main/java/org/shedlang/compiler/typechecker/DeclaredVariables.java index b12061f8..a6cfde24 100644 --- a/src/main/java/org/shedlang/compiler/typechecker/DeclaredVariables.java +++ b/src/main/java/org/shedlang/compiler/typechecker/DeclaredVariables.java @@ -73,7 +73,11 @@ class DeclaredVariables { )); case UntypedStructDefinitionNode struct -> - throw new UnsupportedOperationException("TODO"); + variables.plus(new DeclaredVariable( + struct.name(), + VariableType.CONSTANT, + struct.source() + )); }; } |
