Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EOL rune = utf8.RuneError
EOL is denoted by a utf8.RuneError
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID int
ID is a consecutive number for identication of a lexed item and parsed item. Primarily for the purpose of debugging lexer and parser output when compared to the JSON encoded tests.
type Item ¶
type Item struct { ID `json:"id"` Type Type `json:"type"` Text string `json:"text,omitempty"` Line int `json:"line"` StartPosition int `json:"startPosition"` Length int `json:"length,omitempty"` }
Struct for tokens emitted by the scanning process
func (Item) MarshalJSON ¶
MarshalJSON satisfies the Marshaler interface.
type Lexer ¶
type Lexer struct { Name string // The name of the current lexer log.Logger // contains filtered or unexported fields }
The Lexer struct tracks the state of the Lexer
type Type ¶
type Type int
Type are the types that are emitted by the lexer.
const ( EOF Type = iota Error Title SectionAdornment Text BlockQuote LiteralBlock SystemMessage Space BlankLine Transition CommentMark EnumListAffix EnumListArabic HyperlinkTargetStart HyperlinkTargetPrefix HyperlinkTargetQuote HyperlinkTargetName HyperlinkTargetSuffix HyperlinkTargetURI InlineStrongOpen InlineStrong InlineStrongClose InlineEmphasisOpen InlineEmphasis InlineEmphasisClose InlineLiteralOpen InlineLiteral InlineLiteralClose InlineInterpretedTextOpen InlineInterpretedText InlineInterpretedTextClose InlineInterpretedTextRoleOpen InlineInterpretedTextRole InlineInterpretedTextRoleClose InlineReferenceOpen InlineReferenceText InlineReferenceClose DefinitionTerm DefinitionText Bullet Escape )
func (*Type) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.