mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Introduce a =: operator
This commit is contained in:
1 parent
0a61b0cc44
commit
79aded4797
6 files changed
+12
-10
No files matched your search
+3
-3
@@ -872,10 +872,10 @@ func (p *parser) parseVarNode(inIterate bool) (*a.Node, error) {
|
||||
|
||||
op := t.ID(0)
|
||||
if inIterate {
|
||||
op = t.IDColon
|
||||
if x := p.peek1(); x != t.IDColon {
|
||||
op = t.IDEqColon
|
||||
if x := p.peek1(); x != t.IDEqColon {
|
||||
got := p.tm.ByID(x)
|
||||
return nil, fmt.Errorf(`parse: expected ":", got %q at %s:%d`, got, p.filename, p.line())
|
||||
return nil, fmt.Errorf(`parse: expected "=:", got %q at %s:%d`, got, p.filename, p.line())
|
||||
}
|
||||
p.src = p.src[1:]
|
||||
value, err = p.parseExpr()
|
||||
|
||||
Reference in new issue
Block a user