Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotValidFormat = errors.New("not valid vdf format")
)
Functions ¶
This section is empty.
Types ¶
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 is our own type that represents a single token to work with during parsing
const ( // Illegal represents a token that we // don`t know in contect of the VDF format Illegal Token // EOF represents the End of File token. // This is used if the file is end EOF // WS represents a whitespace. // This can be a space or a tab. WS // EOL represents a line ending. // This can be a \n or a \r. EOL // Ident represents a key or a value. // Typically this is a simple string Ident // CurlyBraceOpen represents a open curly brace "{" CurlyBraceOpen // CurlyBraceClose represents a close curly brace "}" CurlyBraceClose // QuotationMark represents a quote mark '"' QuotationMark // EscapeSequence represents an escape character "\" EscapeSequence // CommentDoubleSlash represents a comment prefix with a double slash "//" CommentDoubleSlash )
Click to show internal directories.
Click to hide internal directories.