Documentation ¶
Index ¶
Constants ¶
View Source
const ( Namespace Token = iota // Use imports a package Use // Let creates a new variable Let // Const creates a new constant Const // Equal assigns a value to a variable Assign Increment Decrement // Nil is an uninitialized token Nil // StringLiteral is a string token: " DoubleStringLiteral // SingleStringLiteral is a single string token: ' SingleStringLiteral // End marks the end of a block: semi-colon SemiColon // SingleLineComment is a single line comment: // SingleLineComment // MultiLineCommentStart is the start of a multi-line comment: /* MultiLineCommentStart // MultiLineCommentEnd is the end of a multi-line comment: */ MultiLineCommentEnd // TemplateStart marks the start of an HTML block: <template> TemplateStart // TemplateEnd marks the end of an HTML block: </template> TemplateEnd Template // Export exports a variable Export Token = iota + 100 // Use imports a package UseToken // Func creates a new function Func // FuncCall calls a function FuncCall // ParantesisStart is the start of a parantesis: ( ParantesisStart // ParantesisEnd is the end of a parantesis: ) ParantesisEnd // CurlyBraceStart is the start of a curly brace: { CurlyBraceStart // CurlyBraceEnd is the end of a curly brace: } CurlyBraceEnd // Return returns a value Return // Identifier is an identifier Identifier For = iota + 100 While If Else Equal NotEqual And Or Addition = iota + 1000 Subtraction Multiplication Division Modulo // Unknown is an unknown token Unknown = iota + 10000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct { Tokens []LexerToken // contains filtered or unexported fields }
type LexerToken ¶
Click to show internal directories.
Click to hide internal directories.