@ 7eeb8a0214368f4491f26f4cf37bd7bf6dc67cd3 | history
package ast
import "government/builtin"
// The structural and constant builtins' names, from package builtin.
const (
ListNode = builtin.ListNode
Dot = builtin.Dot
True = builtin.True
False = builtin.False
Empty = builtin.Empty
)
// IsBuiltin reports whether name is in namespace 0.
func IsBuiltin(name string) bool {
_, ok := builtin.Lookup(name)
return ok
}
// isReservedSymbol reports whether a source symbol names a builtin, and so
// goes in namespace 0. The structural names never come out of the reader
// as symbols; if one did, it must stay a symbol rather than turn into
// structure.
func isReservedSymbol(name string) bool {
return builtin.IsReserved(name)
}