Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { // Type refer the type content (Verse, Text, Paragraph etc.) Type string // Value is the text (Empty for markers) Value string // Children point to the child contents (empty if no child) Children []*Content }
Content represents a part of source It could be a marker or text
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a parser.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner represents a lexical scanner.
func NewScanner ¶
NewScanner returns a new instance of Scanner.
type Token ¶
type Token int
Token represents a lexical token.
const ( // Illegal represents an illegal/invalid character Illegal Token = iota // Whitespace represents a white space (" ", \t, \r, \n) character Whitespace // EOF represents end of file EOF // MarkerID represents '\id' or '\id1' marker MarkerID // MarkerIde represents '\ide' marker MarkerIde // MarkerImte1 represents '\imte' or '\imte1' marker MarkerImte1 // MarkerC represents '\c' marker MarkerC // MarkerV represents '\v' marker MarkerV // Number represents a number (verse, chapter) Number // Text represents actual text Text )
Click to show internal directories.
Click to hide internal directories.