mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
lang/parse: struct private data now needs a "+"
This commit is contained in:
1 parent
f5eb38d76e
commit
49fa501f0d
13 files changed
+18
-12
No files matched your search
+6
-1
@@ -344,7 +344,12 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if x := p.peek1(); x == t.IDOpenParen {
|
||||
if x := p.peek1(); x == t.IDPlus {
|
||||
p.src = p.src[1:]
|
||||
if x := p.peek1(); x != t.IDOpenParen {
|
||||
return nil, fmt.Errorf(`parse: expected "(", got %q at %s:%d`,
|
||||
p.tm.ByID(x), p.filename, p.line())
|
||||
}
|
||||
extraFields, err := p.parseList(t.IDCloseParen, (*parser).parseExtraFieldNode)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -120,7 +120,7 @@ func Render(w io.Writer, tm *t.Map, src []t.Token, comments []string) (err error
|
||||
buf = appendTabs(buf, indent+indentAdjustment)
|
||||
|
||||
// Apply or update varNameLength.
|
||||
if len(lineTokens) < 3 {
|
||||
if len(lineTokens) < 4 {
|
||||
varNameLength = 0
|
||||
} else {
|
||||
id0 := lineTokens[0].ID
|
||||
|
||||
Reference in new issue
Block a user