pboyer / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
Other
26 stars 1 forks source link

tool/Go: Add predefined identifiers to list of keywords. #22

Closed jwkohnen closed 8 years ago

jwkohnen commented 8 years ago

Predefined indentifiers such as true are not keywords in the strict sense (as they are in e.g. Java), but I guess we should still prevent colliding with them, should we not?

wjk@344df8db4881:tmp$ cat > test.go
package main

import "fmt"

func main() {
    true := false
    fmt.Printf("true: %t\n", true)
}
wjk@344df8db4881:tmp$ go run test.go 
true: false

TIL. :-O

willfaught commented 8 years ago

Otherwise LGTM.

jwkohnen commented 8 years ago

squashed

pboyer commented 8 years ago

Yay @wjkohnen!