mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Change status "?foo" to just "?foo"
This commit is contained in:
1 parent
5f9d007b1c
commit
875362ea07
14 files changed
+136
-152
No files matched your search
@@ -1008,18 +1008,6 @@ func (p *parser) parseOperand() (*a.Expr, error) {
|
||||
}
|
||||
p.src = p.src[1:]
|
||||
return expr, nil
|
||||
|
||||
case t.IDStatus:
|
||||
p.src = p.src[1:]
|
||||
message := p.peek1()
|
||||
// TODO: parse the "pkg" in `error pkg."foo"`.
|
||||
statusPkg := t.ID(0)
|
||||
if !message.IsStrLiteral(p.tm) {
|
||||
got := p.tm.ByID(message)
|
||||
return nil, fmt.Errorf(`parse: expected string literal, got %q at %s:%d`, got, p.filename, p.line())
|
||||
}
|
||||
p.src = p.src[1:]
|
||||
return a.NewExpr(0, t.IDStatus, statusPkg, message, nil, nil, nil, nil), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user