ast package full godoc

This commit is contained in:
Aidan 2020-07-18 14:40:35 -07:00
parent 956044cfae
commit fec3550702
No known key found for this signature in database
GPG key ID: 327711E983899316
7 changed files with 68 additions and 26 deletions

View file

@ -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