diff options
author | Camil Staps | 2023-11-29 11:26:28 +0100 |
---|---|---|
committer | Camil Staps | 2023-11-29 11:26:28 +0100 |
commit | 4ce6adb6f5dc6623b903853322be726a9f95a3b8 (patch) | |
tree | 927447752dcf46f491be81eabbd68a5d5e06ffa8 /snug-clean/src/Snug/Compile.dcl | |
parent | WIP on code generation for case expressions (diff) |
Continue with cases WIP: todo is matching code for basic values and adding locals for constructor arguments in a patterncases
Diffstat (limited to 'snug-clean/src/Snug/Compile.dcl')
-rw-r--r-- | snug-clean/src/Snug/Compile.dcl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/snug-clean/src/Snug/Compile.dcl b/snug-clean/src/Snug/Compile.dcl index ef223b8..dd8bef1 100644 --- a/snug-clean/src/Snug/Compile.dcl +++ b/snug-clean/src/Snug/Compile.dcl @@ -29,13 +29,15 @@ from Snug.Syntax import :: ConstructorDef, :: ConstructorIdent, :: Definition, :: CompileState -:: Locals :== Map SymbolIdent LocalLocation +:: Locals :== Map SymbolIdent Symbol -:: Local = - { location :: !LocalLocation - , type :: !Type - } +:: Symbol + = LocalSymbol !LocalLocation + | FunctionSymbol !FunctionInfo + | ConstructorSymbol !ConstructorDef :: LocalLocation compile :: !Namespace ![Definition] -> MaybeError String [Line] + +lookupConstructorM :: !ConstructorIdent -> CompileM ConstructorDef |