Documentation
¶
Overview ¶
Package lexer tokenises bc source into a stream of tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind int
Kind is the type of a token.
const ( EOF Kind = iota NEWLINE // significant statement terminator NUMBER STRING IDENT // keywords KwIf KwElse KwWhile KwFor KwBreak KwContinue KwReturn KwDefine KwAuto KwPrint KwQuit KwHalt KwLimits KwWarranty KwLength KwSqrt KwScale // scale used as function: scale(expr) KwRead KwLast // "last" keyword // operators PLUS // + MINUS // - STAR // * SLASH // / PCT // % CARET // ^ AND // && OR // || NOT // ! LT // < LE // <= GT // > GE // >= EQ // == NE // != ASSIGN // = ADDAS // += SUBAS // -= MULAS // *= DIVAS // /= MODAS // %= POWAS // ^= INC // ++ DEC // -- // punctuation LPAREN // ( RPAREN // ) LBRACK // [ RBRACK // ] LBRACE // { RBRACE // } COMMA // , SEMI // ; DOT // . (shorthand for last) )
Click to show internal directories.
Click to hide internal directories.