feat(parser): evaluate the TEXT and GLOBL flags operand as one expression
Assisted-by: GLM 5.3 Flash
This commit is contained in:
1 parent
4eb9100def
commit
cea5db6964
4 files changed
+239
-16
No files matched your search
+12
-2
@@ -58,8 +58,14 @@ type Text struct {
|
||||
Keyword token.Token // the TEXT token
|
||||
Name *Symbol // ·funcName(SB)
|
||||
Flags []string // NOSPLIT, DUPOK, …
|
||||
Frame *Operand // $0
|
||||
Args *Operand // the -65 part; nil when absent
|
||||
// FlagVal is the flags operand as the toolchain reads it: one integer
|
||||
// the operand evaluates to, the OR of the named flags and any literals
|
||||
// written beside them. Zero when the TEXT carries no flags operand, and
|
||||
// after an evaluation failure, where Flags still carries the scanned
|
||||
// names beside the diagnostic.
|
||||
FlagVal int64
|
||||
Frame *Operand // $0
|
||||
Args *Operand // the -65 part; nil when absent
|
||||
Body []Stmt
|
||||
Doc string // preceding comment block (typically the Go signature)
|
||||
}
|
||||
@@ -72,6 +78,10 @@ type Globl struct {
|
||||
Keyword token.Token
|
||||
Name *Symbol
|
||||
Flags []string
|
||||
// FlagVal is the flags operand folded to the one integer the toolchain
|
||||
// evaluates it as, exactly as on Text. Zero when the GLOBL carries no
|
||||
// flags operand or the operand failed to evaluate.
|
||||
FlagVal int64
|
||||
Size *Operand
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user