added ability for user to enter boolean literals
This commit is contained in:
parent
4865c7ce92
commit
c90d445d7d
1 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ const string_delims string = "\"'`"
|
|||
|
||||
func Lex(input string) *Token {
|
||||
ret := lex(input)
|
||||
if ret == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if ret.Tag != LIST {
|
||||
temp := &Token{Tag: LIST}
|
||||
temp.Direct(ret)
|
||||
|
|
@ -67,6 +71,9 @@ func lex(input string) *Token {
|
|||
} else if StrIsNumber(tok) {
|
||||
(*iter).Tag = NUMBER
|
||||
|
||||
} else if tok == "T" || tok == "F" {
|
||||
(*iter).Tag = BOOL
|
||||
|
||||
} else {
|
||||
(*iter).Tag = SYMBOL
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue