Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Position ¶
type Position struct { Filename string Offset int //offset relative to entire file Line int Col int //offset relative to each line }
Position is the location of a code point in the source
type TokenType ¶
type TokenType int
token
const ( TOKEN_ILLEGAL TokenType = (iota - 1) // Illegal token TOKEN_EOF //End Of File TOKEN_PLUS // + TOKEN_MINUS // - TOKEN_MULTIPLY // * TOKEN_DIVIDE // '/' TOKEN_MOD // '%' TOKEN_POWER // ** TOKEN_INCREMENT // ++ TOKEN_DECREMENT // -- TOKEN_LPAREN // ( TOKEN_RPAREN // ) TOKEN_ASSIGN // = TOKEN_SEMICOLON //; TOKEN_COLON //: TOKEN_COMMA //, TOKEN_DOT //. TOKEN_LBRACE // { TOKEN_RBRACE // } TOKEN_BANG // ! TOKEN_LBRACKET // [ TOKEN_RBRACKET // ] TOKEN_LT // < TOKEN_LE // <= TOKEN_GT // > TOKEN_GE // >= TOKEN_EQ // == TOKEN_NEQ // != TOKEN_NUMBER //10 or 10.1 TOKEN_IDENTIFIER //identifier TOKEN_STRING //"" //reserved keywords TOKEN_TRUE //true TOKEN_FALSE //false TOKEN_NIL // nil TOKEN_LET //let TOKEN_RETURN //return TOKEN_FUNCTION //fn TOKEN_IF //if TOKEN_ELSE //else TOKEN_FOR //for TOKEN_IN //in TOKEN_BREAK //break TOKEN_CONTINUE //continue )
func LookupIdent ¶
Click to show internal directories.
Click to hide internal directories.