Documentation
      ¶
    
    
  
    
  
    Index ¶
- type NodeOptions
 - type Tracker
 - func (t *Tracker) GetChanges() map[string][]*lsproto.TextEdit
 - func (t *Tracker) InsertAtTopOfFile(sourceFile *ast.SourceFile, insert []*ast.Statement, blankLineBetween bool)
 - func (t *Tracker) InsertImportSpecifierAtIndex(sourceFile *ast.SourceFile, newSpecifier *ast.Node, namedImports *ast.Node, ...)
 - func (t *Tracker) InsertNodeAfter(sourceFile *ast.SourceFile, after *ast.Node, newNode *ast.Node)
 - func (t *Tracker) InsertNodeAt(sourceFile *ast.SourceFile, pos core.TextPos, newNode *ast.Node, ...)
 - func (t *Tracker) InsertNodeBefore(sourceFile *ast.SourceFile, before *ast.Node, newNode *ast.Node, ...)
 - func (t *Tracker) InsertNodeInListAfter(sourceFile *ast.SourceFile, after *ast.Node, newNode *ast.Node, ...)
 - func (t *Tracker) InsertNodesAfter(sourceFile *ast.SourceFile, after *ast.Node, newNodes []*ast.Node)
 - func (t *Tracker) InsertNodesAt(sourceFile *ast.SourceFile, pos core.TextPos, newNodes []*ast.Node, ...)
 - func (t *Tracker) InsertText(sourceFile *ast.SourceFile, pos lsproto.Position, text string)
 - func (t *Tracker) ReplaceNode(sourceFile *ast.SourceFile, oldNode *ast.Node, newNode *ast.Node, ...)
 - func (t *Tracker) ReplaceRange(sourceFile *ast.SourceFile, lsprotoRange lsproto.Range, newNode *ast.Node, ...)
 - func (t *Tracker) ReplaceRangeWithNodes(sourceFile *ast.SourceFile, lsprotoRange lsproto.Range, newNodes []*ast.Node, ...)
 - func (t *Tracker) ReplaceRangeWithText(sourceFile *ast.SourceFile, lsprotoRange lsproto.Range, text string)
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeOptions ¶
type Tracker ¶
type Tracker struct {
	*printer.EmitContext
	*ast.NodeFactory
	// contains filtered or unexported fields
}
    func NewTracker ¶
func NewTracker(ctx context.Context, compilerOptions *core.CompilerOptions, formatOptions *format.FormatCodeSettings, converters *lsconv.Converters) *Tracker
func (*Tracker) GetChanges ¶
!!! address strada note
- Note: after calling this, the TextChanges object must be discarded!
 
func (*Tracker) InsertAtTopOfFile ¶
func (*Tracker) InsertImportSpecifierAtIndex ¶
func (t *Tracker) InsertImportSpecifierAtIndex(sourceFile *ast.SourceFile, newSpecifier *ast.Node, namedImports *ast.Node, index int)
InsertImportSpecifierAtIndex inserts a new import specifier at the specified index in a NamedImports list
func (*Tracker) InsertNodeAfter ¶
func (*Tracker) InsertNodeAt ¶
func (t *Tracker) InsertNodeAt(sourceFile *ast.SourceFile, pos core.TextPos, newNode *ast.Node, options NodeOptions)
func (*Tracker) InsertNodeBefore ¶
func (*Tracker) InsertNodeInListAfter ¶
func (t *Tracker) InsertNodeInListAfter(sourceFile *ast.SourceFile, after *ast.Node, newNode *ast.Node, containingList []*ast.Node)
* * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range, * i.e. arguments in arguments lists, parameters in parameter lists etc. * Note that separators are part of the node in statements and class elements.
func (*Tracker) InsertNodesAfter ¶
func (*Tracker) InsertNodesAt ¶
func (t *Tracker) InsertNodesAt(sourceFile *ast.SourceFile, pos core.TextPos, newNodes []*ast.Node, options NodeOptions)
func (*Tracker) InsertText ¶
func (*Tracker) ReplaceNode ¶
func (t *Tracker) ReplaceNode(sourceFile *ast.SourceFile, oldNode *ast.Node, newNode *ast.Node, options *NodeOptions)
func (*Tracker) ReplaceRange ¶
func (t *Tracker) ReplaceRange(sourceFile *ast.SourceFile, lsprotoRange lsproto.Range, newNode *ast.Node, options NodeOptions)
func (*Tracker) ReplaceRangeWithNodes ¶
func (t *Tracker) ReplaceRangeWithNodes(sourceFile *ast.SourceFile, lsprotoRange lsproto.Range, newNodes []*ast.Node, options NodeOptions)
func (*Tracker) ReplaceRangeWithText ¶
 Click to show internal directories. 
   Click to hide internal directories.