Skip to content

Commit 9780216

Browse files
committed
Add better support for flags.
1 parent 295271e commit 9780216

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

spicy.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ type StackValue struct {
1818
AddedValues []*Value `{"+" @@}`
1919
}
2020

21+
type Flag struct {
22+
Boot bool `@"BOOT" |`
23+
Object bool `@"OBJECT" |`
24+
Raw bool `@"RAW"`
25+
}
26+
2127
type SegmentStatement struct {
2228
/*
2329
:name <segmentName>
@@ -39,7 +45,7 @@ type SegmentStatement struct {
3945
Include string `"include" @String |`
4046
MaxSize string `"maxsize" @String |`
4147
Align string `"align" @String |`
42-
Flags []*string `"flags" { "BOOT" | "OBJECT" | "RAW" } |`
48+
Flags []*Flag `"flags" { @@ } |`
4349
Number int `"number" @Int|`
4450
Entry string `"entry" @Ident |`
4551
Stack StackValue `"stack" @@`

0 commit comments

Comments
 (0)