Documentation
¶
Overview ¶
Code generated by langlang (a701a99503836215476330c6259ed00ec288bf9a commit hash), DO NOT EDIT. Source File: /tmp/orgmode.peg
Index ¶
- func FormatExpectedMessage(hints []ErrHint, input []byte, pos int) string
- func LabelMessagesForParser(labels map[string]string) map[int]int
- func NewVirtualMachine(bytecode *Bytecode) *virtualMachine
- type Bytecode
- type Diagnostic
- type DiagnosticSeverity
- type ErrHint
- type ErrHintType
- type FileID
- type FileLoadError
- type FormatFunc
- type FormatToken
- type ImportLoader
- type Location
- type Matcher
- type NodeID
- type NodeType
- type Parser
- type ParsingError
- type SourceLocation
- type SourceMap
- type Span
- type Tree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatExpectedMessage ¶
Types ¶
type Bytecode ¶
type Bytecode struct {
// contains filtered or unexported fields
}
func (*Bytecode) CompileErrorLabels ¶
type Diagnostic ¶
type Diagnostic struct {
Location SourceLocation
Severity DiagnosticSeverity
Message string
Code string
FilePath string
Expected []ErrHint
}
func (Diagnostic) FormatCLI ¶
func (d Diagnostic) FormatCLI() string
func (Diagnostic) String ¶
func (d Diagnostic) String() string
type DiagnosticSeverity ¶
type DiagnosticSeverity int
const ( DiagnosticError DiagnosticSeverity = iota DiagnosticWarning DiagnosticInfo DiagnosticHint )
func (DiagnosticSeverity) String ¶
func (s DiagnosticSeverity) String() string
type ErrHint ¶
type ErrHint struct {
Type ErrHintType
Char rune
Range [2]rune
}
type ErrHintType ¶
type ErrHintType uint8
const ( ErrHintType_Unknown ErrHintType = iota ErrHintType_EOF ErrHintType_Char ErrHintType_Range )
type FileLoadError ¶
func (*FileLoadError) Error ¶
func (e *FileLoadError) Error() string
func (*FileLoadError) Unwrap ¶
func (e *FileLoadError) Unwrap() error
type FormatToken ¶
type FormatToken int
const ( FormatToken_None FormatToken = iota FormatToken_Range FormatToken_Literal FormatToken_Error )
type ImportLoader ¶
type Location ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
type ParsingError ¶
type ParsingError struct {
Message string
Label string
Start, End int
Expected []ErrHint
FFPPC int
}
func (ParsingError) Error ¶
func (e ParsingError) Error() string
type SourceMap ¶
type Span ¶
type Tree ¶
type Tree interface {
Root() (NodeID, bool)
Visit(id NodeID, fn func(NodeID) bool)
Type(NodeID) NodeType
Span(NodeID) Span
Location(cursor int) Location
CursorU16(cursor int) int
Name(NodeID) string
Message(NodeID) string
Child(NodeID) (NodeID, bool)
Children(NodeID) []NodeID
Text(NodeID) string
Pretty(NodeID) string
Highlight(NodeID) string
Copy() Tree
}
Source Files
¶
- main.go
Click to show internal directories.
Click to hide internal directories.