Documentation ¶
Index ¶
- Constants
- func AstToPsi(sf *SourceFile, parsed antlr.ParserRuleContext) psi.Node
- func NewLanguage(p project2.Project) psi.Language
- type BufferFileHandle
- type Language
- func (l *Language) CreateSourceFile(fileName string, fileHandle repofs.FileHandle) psi.SourceFile
- func (l *Language) Extensions() []string
- func (l *Language) Name() psi.LanguageID
- 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]) String() string
- func (nb *NodeBase[T]) Update(context.Context) error
- type SourceFile
- func (sf *SourceFile) Error() error
- 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 ¶
View Source
const LanguageID psi.LanguageID = "c"
Variables ¶
This section is empty.
Functions ¶
func AstToPsi ¶
func AstToPsi(sf *SourceFile, parsed antlr.ParserRuleContext) psi.Node
Types ¶
type BufferFileHandle ¶
type BufferFileHandle struct {
// contains filtered or unexported fields
}
func (BufferFileHandle) Close ¶
func (b BufferFileHandle) Close() error
func (BufferFileHandle) Get ¶
func (b BufferFileHandle) Get() (io.ReadCloser, error)
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) Extensions ¶
func (*Language) Name ¶
func (l *Language) Name() psi.LanguageID
func (*Language) ParseCodeBlock ¶
type NodeBase ¶
type NodeBase[T antlr.ParserRuleContext] struct { psi.NodeBase // contains filtered or unexported fields }
func NewNodeFor ¶
func NewNodeFor(node antlr.ParserRuleContext) *NodeBase[antlr.ParserRuleContext]
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) 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.