mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Reserve the "ideal" name.
Also reject using built-in names as struct or func names.
This commit is contained in:
1 parent
567e6f7459
commit
a8a246be7c
3 files changed
+17
-8
No files matched your search
@@ -179,6 +179,7 @@ const (
|
||||
IDStruct = ID(0x69<<KeyShift | FlagsOther)
|
||||
IDUse = ID(0x6A<<KeyShift | FlagsOther)
|
||||
IDVar = ID(0x6B<<KeyShift | FlagsOther)
|
||||
IDIdeal = ID(0x6C<<KeyShift | FlagsOther)
|
||||
|
||||
IDFalse = ID(0x90<<KeyShift | FlagsLiteral | FlagsImplicitSemicolon)
|
||||
IDTrue = ID(0x91<<KeyShift | FlagsLiteral | FlagsImplicitSemicolon)
|
||||
@@ -303,6 +304,7 @@ var builtInsByKey = [nBuiltInKeys]struct {
|
||||
IDStruct >> KeyShift: {"struct", IDStruct},
|
||||
IDUse >> KeyShift: {"use", IDUse},
|
||||
IDVar >> KeyShift: {"var", IDVar},
|
||||
IDIdeal >> KeyShift: {"ideal", IDIdeal},
|
||||
|
||||
IDFalse >> KeyShift: {"false", IDFalse},
|
||||
IDTrue >> KeyShift: {"true", IDTrue},
|
||||
|
||||
Reference in new issue
Block a user