mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Remove token ID/Key distinction, part 1 of N
This commit is contained in:
1 parent
06ff3d3369
commit
afd7429e9a
4 files changed
+190
-151
No files matched your search
+2
-2
@@ -309,7 +309,7 @@ func (p *parser) parseIdent() (t.ID, error) {
|
||||
return 0, fmt.Errorf(`parse: expected identifier at %s:%d`, p.filename, p.line())
|
||||
}
|
||||
x := p.src[0]
|
||||
if !x.IsIdent() {
|
||||
if !x.ID.IsIdent() {
|
||||
got := p.tm.ByToken(x)
|
||||
return 0, fmt.Errorf(`parse: expected identifier, got %q at %s:%d`, got, p.filename, p.line())
|
||||
}
|
||||
@@ -978,7 +978,7 @@ func (p *parser) parseOperand() (*a.Expr, error) {
|
||||
|
||||
case t.KeyExclam, t.KeyQuestion:
|
||||
flags |= a.FlagsImpure | a.FlagsCallImpure
|
||||
if p.src[0].Key() == t.KeyQuestion {
|
||||
if p.src[0].ID.Key() == t.KeyQuestion {
|
||||
flags |= a.FlagsSuspendible | a.FlagsCallSuspendible
|
||||
}
|
||||
p.src = p.src[1:]
|
||||
|
||||
Reference in new issue
Block a user