diff options
Diffstat (limited to 'src/Language/Fiddle/Ast')
-rw-r--r-- | src/Language/Fiddle/Ast/Internal/SyntaxTree.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs index 2774507..a4f98e3 100644 --- a/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs +++ b/src/Language/Fiddle/Ast/Internal/SyntaxTree.hs @@ -119,7 +119,8 @@ regSzToBits RegSz64 = 64 data QBitsMetadata (checkStage :: Bool) where QBitsMetadata :: { bitsSpan :: When checkStage (FieldSpan Bits), - bitsFullPath :: QualifiedPath String + bitsFullPath :: QualifiedPath String, + bitsUnnamed :: Bool } -> QBitsMetadata checkStage deriving (Generic, ToJSON) @@ -666,7 +667,12 @@ data RegisterBitsDecl stage f a where RegisterBitsDecl stage f a -- | Substructure within a register. BitsSubStructure :: - { -- | The body of the substructure. + { -- | Metadata about the bits. + qBitsMetadata :: When (stage .>= Qualified) (QBitsMetadata (stage .>= Checked)), + -- | Modifier for these bits. Useful when multiple fields need to be set + -- atomically. + bitsModifier :: Guaranteed (stage .>= Qualified) (Modifier f a), + -- | The body of the substructure. bitsSubRegBody :: RegisterBody stage f a, -- | Optional name for the substructure. bitsSubName :: Maybe (Identifier f a), |