Documentation ¶
Index ¶
- Constants
- type Lexer
- type State
- func LexCloseCodeFence(l *Lexer) State
- func LexCloseInlineCode(l *Lexer) State
- func LexCode(l *Lexer) State
- func LexComment(l *Lexer) State
- func LexFrontMatter(l *Lexer) State
- func LexHeader(l *Lexer) State
- func LexLine(l *Lexer) State
- func LexLineEndInCode(l *Lexer) State
- func LexLink(l *Lexer) State
- func LexNumber(l *Lexer) State
- func LexOpenCodeFence(l *Lexer) State
- func LexOpenInlineCode(l *Lexer) State
- func LexOperator(l *Lexer) State
- func LexString(l *Lexer) State
- func LexSymbol(l *Lexer) State
- func LexUnorderedListItem(l *Lexer) State
Constants ¶
View Source
const ( Hash = "#" LineEnd = "\n" CodeDelimiter = "`" FencedCodeBlockDelimiter = "```" OpenSquareBracket = "[" CloseSquareBracket = "]" OpenParen = "(" CloseParen = ")" OpenCurlyBrace = "{" CloseCurlyBrace = "}" Comma = "," UnorderedListPrefix = "-" Whitespace = " \t" SymbolStart = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" SymbolTail = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" NumberStart = "0123456789" StringStart = "\"" PlusPlus = "++" MinusMinus = "--" Not = "!" Plus = "+" Minus = "-" Star = "*" Slash = "/" Percent = "%" Gte = ">=" Gt = ">" Lte = "<=" Lt = "<" Eq = "=" EqEq = "==" Neq = "!=" TrueLiteral = "true" FalseLiteral = "false" NullLiteral = "null" GotoLiteral = "goto" Dot = "." Semicolon = ";" And = "&&" Or = "||" Operators = "!+-*/><=&|{}().,;%" IfLiteral = "if" ElseLiteral = "else" WhileLiteral = "while" Comment = "//" BoolType = "bool" NumberType = "number" StringType = "string" NullType = "null" ExternKeyword = "extern" )
View Source
const ( ErrorBadHeader = "Header must only be of the form '# HeaderName\\n" ErrorBadLink = "Link must only be of the form '[symbol] (text)\\n" ErrorBadCode = "Unrecognized code element" ErrorBadNumber = "Numbers must be in format -?0|([1-9][0-9]*(e[+-]?[0-9])?)" ErrorBadOperator = "Not a valid operator" ErrorBadString = "Not a valid string" ErrorBadEscape = "The only valid escapes are \\\\, \\/, \\b, \\f, \\n, \\r, \\t, \\uxxxx" ErrorBadFrontMatterEnd = "Fromtmatter must end in mewline" ErrorBadFrontmatter = "Unrecognized token in frontmatter" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
func LexCloseCodeFence ¶
func LexCloseInlineCode ¶
func LexComment ¶
func LexFrontMatter ¶
func LexLineEndInCode ¶
func LexOpenCodeFence ¶
func LexOpenInlineCode ¶
func LexOperator ¶
func LexUnorderedListItem ¶
Click to show internal directories.
Click to hide internal directories.