Documentation ¶
Index ¶
- func AstToPsi(sf *SourceFile, parsed antlr.ParserRuleContext) psi.Node
- type CharTokenizer
- type Language
- func (l *Language) CreateSourceFile(fileName string, fileHandle repofs.FileHandle) psi.SourceFile
- func (l *Language) Init(self psi.Language, p project.Project)
- func (l *Language) Parse(fileName string, code string) (psi.SourceFile, error)
- func (l *Language) ParseCodeBlock(blockName string, block mdutils.CodeBlock) (psi.SourceFile, error)
- type Node
- type NodeBase
- func (nb *NodeBase[T]) Ast() antlr.ParserRuleContext
- func (nb *NodeBase[T]) Comments() []string
- func (nb *NodeBase[T]) Initialize(self Node)
- func (nb *NodeBase[T]) IsContainer() bool
- func (nb *NodeBase[T]) IsLeaf() bool
- func (nb *NodeBase[T]) Token() antlr.Token
- func (nb *NodeBase[T]) Tree() antlr.ParseTree
- func (nb *NodeBase[T]) Update(context.Context) error
- type SourceFile
- func (sf *SourceFile) Error() error
- func (sf *SourceFile) GetAdjustedTokenInterval(n Node) antlr.Interval
- func (sf *SourceFile) Language() psi.Language
- func (sf *SourceFile) Load() error
- func (sf *SourceFile) MergeCompletionResults(ctx context.Context, scope psi.Scope, cursor psi.Cursor, ...) error
- func (sf *SourceFile) Name() string
- func (sf *SourceFile) OriginalText() string
- func (sf *SourceFile) Parse(filename string, sourceCode string) (result psi.Node, err error)
- func (sf *SourceFile) Path() string
- func (sf *SourceFile) Replace(code string) error
- func (sf *SourceFile) Root() psi.Node
- func (sf *SourceFile) SetRoot(node antlr.ParserRuleContext, original string, tokens *antlr.CommonTokenStream) error
- func (sf *SourceFile) ToCode(node psi.Node) (mdutils.CodeBlock, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AstToPsi ¶
func AstToPsi(sf *SourceFile, parsed antlr.ParserRuleContext) psi.Node
Types ¶
type CharTokenizer ¶
type CharTokenizer struct { }
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
func (*Language) CreateSourceFile ¶
func (l *Language) CreateSourceFile(fileName string, fileHandle repofs.FileHandle) psi.SourceFile
func (*Language) ParseCodeBlock ¶
type NodeBase ¶
func NewNodeFor ¶
func NewNodeFor[T antlr.ParseTree](sf *SourceFile, node T) *NodeBase[T]
func (*NodeBase[T]) Initialize ¶
func (*NodeBase[T]) IsContainer ¶
type SourceFile ¶
func NewSourceFile ¶
func NewSourceFile(l *Language, name string, handle repofs.FileHandle) *SourceFile
func (*SourceFile) Error ¶
func (sf *SourceFile) Error() error
func (*SourceFile) GetAdjustedTokenInterval ¶
func (sf *SourceFile) GetAdjustedTokenInterval(n Node) antlr.Interval
func (*SourceFile) Language ¶
func (sf *SourceFile) Language() psi.Language
func (*SourceFile) Load ¶
func (sf *SourceFile) Load() error
func (*SourceFile) MergeCompletionResults ¶
func (*SourceFile) Name ¶
func (sf *SourceFile) Name() string
func (*SourceFile) OriginalText ¶
func (sf *SourceFile) OriginalText() string
func (*SourceFile) Path ¶
func (sf *SourceFile) Path() string
func (*SourceFile) Replace ¶
func (sf *SourceFile) Replace(code string) error
func (*SourceFile) Root ¶
func (sf *SourceFile) Root() psi.Node
func (*SourceFile) SetRoot ¶
func (sf *SourceFile) SetRoot(node antlr.ParserRuleContext, original string, tokens *antlr.CommonTokenStream) error
Click to show internal directories.
Click to hide internal directories.