ast package full godoc
This commit is contained in:
parent
956044cfae
commit
fec3550702
7 changed files with 68 additions and 26 deletions
|
|
@ -22,8 +22,12 @@ import (
|
|||
"unicode"
|
||||
)
|
||||
|
||||
// all delimiters that work on strings
|
||||
const string_delims string = "\"'`"
|
||||
|
||||
/* takes a line of user input
|
||||
* returns an unsimplified tree of tokens
|
||||
*/
|
||||
func Lex(input string) *Token {
|
||||
ret := lex(input)
|
||||
if ret == nil {
|
||||
|
|
@ -201,6 +205,7 @@ error:
|
|||
return nil
|
||||
}
|
||||
|
||||
// returns true if a string could contain an int or float
|
||||
func StrIsNumber(arg string) bool {
|
||||
dotCount := 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue