Skip to content

Commit

Permalink
Add new predeclared identifiers (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
meyermarcel authored Nov 16, 2024
1 parent b6c2404 commit 531d4f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootstrap/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ var blacklistedIdents = map[string]struct{}{
"var": {},

// predeclared identifiers http://golang.org/ref/spec#Predeclared_identifiers
"any": {},
"bool": {},
"byte": {},
"comparable": {},
"complex64": {},
"complex128": {},
"error": {},
Expand All @@ -128,13 +130,16 @@ var blacklistedIdents = map[string]struct{}{
"nil": {},
"append": {},
"cap": {},
"clear": {},
"close": {},
"complex": {},
"copy": {},
"delete": {},
"imag": {},
"len": {},
"make": {},
"max": {},
"min": {},
"new": {},
"panic": {},
"print": {},
Expand Down
5 changes: 5 additions & 0 deletions reserved_words.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ var reservedWords = map[string]bool{
"var": true,

// predeclared identifiers http://golang.org/ref/spec#Predeclared_identifiers
"any": true,
"bool": true,
"byte": true,
"comparable": true,
"complex64": true,
"complex128": true,
"error": true,
Expand All @@ -55,13 +57,16 @@ var reservedWords = map[string]bool{
"nil": true,
"append": true,
"cap": true,
"clear": true,
"close": true,
"complex": true,
"copy": true,
"delete": true,
"imag": true,
"len": true,
"make": true,
"max": true,
"min": true,
"new": true,
"panic": true,
"println": true,
Expand Down

0 comments on commit 531d4f4

Please # to comment.