summaryrefslogtreecommitdiff
path: root/src/Language/Fiddle/Compiler/Qualification.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-12-03 17:49:28 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-12-03 17:49:28 -0700
commitf371a310affd9501f48aa8ade4670f9a29070cad (patch)
tree3c7815e1d3672f425787855a0f25513cce49db9c /src/Language/Fiddle/Compiler/Qualification.hs
parent673c99472da3de2d52bd29fec91978166f008766 (diff)
downloadfiddle-f371a310affd9501f48aa8ade4670f9a29070cad.tar.gz
fiddle-f371a310affd9501f48aa8ade4670f9a29070cad.tar.bz2
fiddle-f371a310affd9501f48aa8ade4670f9a29070cad.zip
Implement new syntactic-sugar for skip_to(). Allows specifying the offset directly on a register
Diffstat (limited to 'src/Language/Fiddle/Compiler/Qualification.hs')
-rw-r--r--src/Language/Fiddle/Compiler/Qualification.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Language/Fiddle/Compiler/Qualification.hs b/src/Language/Fiddle/Compiler/Qualification.hs
index ac99f48..4f3d380 100644
--- a/src/Language/Fiddle/Compiler/Qualification.hs
+++ b/src/Language/Fiddle/Compiler/Qualification.hs
@@ -239,7 +239,7 @@ instance AdvanceStage S ObjTypeDecl where
ident'
<$> advanceStage localState'' sz
<*> pure ann
- RegisterDecl _ mod ident size bod ann -> do
+ RegisterDecl _ mod ident size Vacant bod ann -> do
ident' <- guaranteeM (uniqueIdentifier "reg" ann) ident
let (qualified, localState') =
@@ -261,6 +261,7 @@ instance AdvanceStage S ObjTypeDecl where
(guarantee (ModifierKeyword Rw ann) mod)
ident'
<$> progressBackM getProperRegSize size
+ <*> pure Vacant
<*> mapM (advanceStage localState'') bod
<*> pure ann
ReservedDecl _ expr ann -> do
@@ -281,6 +282,7 @@ instance AdvanceStage S ObjTypeDecl where
(Guaranteed $ ModifierKeyword Pr ann)
(Guaranteed ident)
<$> fmap LeftV (getProperRegSize expr)
+ <*> pure Vacant
<*> pure Nothing
<*> pure ann
TypeSubStructure bod name an -> do