Documentation ¶
Overview ¶
Package token defines the tokens for kl lexers.
Index ¶
- Variables
- func NormalizeString(s string) string
- type Token
- func (tok Token) CmpOpposite() Token
- func (tok Token) IsAssign() bool
- func (tok Token) IsBuiltin() bool
- func (tok Token) IsCmp() bool
- func (tok Token) IsKeyword() bool
- func (tok Token) IsPrefix() bool
- func (tok Token) IsSign() bool
- func (tok Token) IsSigned() bool
- func (tok Token) IsType() bool
- func (tok Token) IsUnsigned() bool
- func (tok Token) IsVar() bool
- func (tok Token) IsVarReserved() bool
- func (tok Token) IsVarString() bool
- func (tok Token) String() string
- func (tok Token) VarStringToVar() Token
Constants ¶
This section is empty.
Variables ¶
View Source
var Tokens = [...]string{}/* 105 elements not displayed */
View Source
var Variables []Token
All available variables.
Functions ¶
func NormalizeString ¶
NormalizeString makes sure the string will be usable as a file name.
Types ¶
type Token ¶
type Token uint8
const ( Invalid Token = iota R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 SR0 SR1 SR2 SR3 SR4 SR5 SR6 SR7 SR8 SR9 RA RB RC RD RBP RSP U8 U16 U32 U64 Pointer S8 S16 S32 S64 If Else EndIf Switch SwitchCase SwitchCaseSep EndSwitch Call Goto Return Embed Asm While EndWhile For EndFor Const Pub Test Len Size PlusPrefix MinusPrefix StringPrefix UnsignedArrayPrefix SignedArrayPrefix StringArrayPrefix CharArrayPrefix Dot Colon Semicolon Hash At Star BracketLeft BracketRight ParenLeft ParenRight CurlyLeft CurlyRight CallInput CallOutput Newline Assign AssignAdd AssignSub AssignMul AssignDiv AssignAnd AssignOr AssignXor AssignNot AssignAndNot AssignShiftLeft AssignShiftRight Equal NotEqual LessThan LessThanEqual GreaterThan GreaterThanEqual Exit Syscall Push Pop Assert Panic Print Min Max String // Lexer specific, do not use as types. Identifier Unsigned Space EOF Error // Package file (kl.pkg) specific tokens. Name Description Import )
func (Token) CmpOpposite ¶
func (Token) IsUnsigned ¶
func (Token) IsVarReserved ¶
func (Token) IsVarString ¶
func (Token) VarStringToVar ¶
Click to show internal directories.
Click to hide internal directories.