mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Disallow double underscore names
This commit is contained in:
1 parent
172bbdbc3f
commit
3eea5914ac
2 files changed
+31
-8
No files matched your search
@@ -125,7 +125,9 @@ func do(r io.Reader, filename string) error {
|
||||
}
|
||||
// We don't need the AST node to pretty-print, but it's worth rejecting
|
||||
// syntax errors early. This is just a parse, not a full type check.
|
||||
if _, err := parse.Parse(tm, filename, tokens, nil); err != nil {
|
||||
if _, err := parse.Parse(tm, filename, tokens, &parse.Options{
|
||||
AllowDoubleUnderscoreNames: true,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
Reference in new issue
Block a user