Documentation ¶
Index ¶
- type Editor
- func (e Editor) GetCompletion(line, column int, doFilter bool) comp.Result
- func (e Editor) GetCompletionInfo(line, column int) comp.Info
- func (e Editor) GetElement(line, column int) antlr.Tree
- func (e Editor) GetElementForCompletion(line, column int) antlr.Tree
- func (e Editor) GetReferences(line, column int) []antlr.ParserRuleContext
- func (e *Editor) SetSchema(schema comp.Metadata)
- func (e *Editor) Update(input string)
- type ErrorListener
- func (el ErrorListener) ReportAmbiguity(antlr.Parser, *antlr.DFA, int, int, bool, *antlr.BitSet, antlr.ATNConfigSet)
- func (el ErrorListener) ReportAttemptingFullContext(antlr.Parser, *antlr.DFA, int, int, *antlr.BitSet, antlr.ATNConfigSet)
- func (el ErrorListener) ReportContextSensitivity(antlr.Parser, *antlr.DFA, int, int, int, antlr.ATNConfigSet)
- func (el *ErrorListener) SyntaxError(r antlr.Recognizer, offendingSymbol any, line, column int, msg string, ...)
- type PosConv
- type SynErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { Input string ParseTree antlr.ParseTree ParseErrors []SynErr // contains filtered or unexported fields }
func (Editor) GetCompletion ¶
func (Editor) GetElement ¶
GetElement returns the ParseTree at the given line and column.
func (Editor) GetElementForCompletion ¶
func (Editor) GetReferences ¶
func (e Editor) GetReferences(line, column int) []antlr.ParserRuleContext
type ErrorListener ¶
type ErrorListener struct {
// contains filtered or unexported fields
}
func Parse ¶
Parse creates a ParseTree from the given input and collects RuleContext nodes for post-processing. The returned Providers hold references to specific elements encountered during the tree traversal.
func (ErrorListener) ReportAmbiguity ¶
func (ErrorListener) ReportAttemptingFullContext ¶
func (ErrorListener) ReportContextSensitivity ¶
func (el ErrorListener) ReportContextSensitivity(antlr.Parser, *antlr.DFA, int, int, int, antlr.ATNConfigSet)
func (*ErrorListener) SyntaxError ¶
func (el *ErrorListener) SyntaxError( r antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException)
type PosConv ¶
type PosConv struct {
// contains filtered or unexported fields
}
PosConv provides line and column info for absolute positions in a multi-line string and vice versa.
func NewPosConv ¶
NewPosConv splits the given input line by line and indexes their position.
func (PosConv) ToAbsolute ¶
ToAbsolute calculates the absolute position of line and column.
Click to show internal directories.
Click to hide internal directories.