Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FprintActions ¶
func FprintActions(w io.Writer, es *EditScript) error
func NodeToString ¶
func NodeToString(n *treesitter.ASTNode) string
Types ¶
type Action ¶
type Action struct {
Type ActionType
Node *treesitter.ASTNode
// DestNode is the target AST node for Move and Update actions, when matched.
DestNode *treesitter.ASTNode
Parent *treesitter.ASTNode
Position int
Value string
Subtree bool
GroupID string
}
type ActionType ¶
type ActionType int
const ( Insert ActionType = iota Delete Update Move )
func (ActionType) String ¶
func (t ActionType) String() string
type EditScript ¶
type EditScript struct {
// contains filtered or unexported fields
}
func GenerateEditScript ¶
func GenerateEditScript( src, dst *treesitter.ASTNode, ms *engine.Mapping, ) *EditScript
func NewEditScript ¶
func NewEditScript() *EditScript
func (*EditScript) Actions ¶
func (es *EditScript) Actions() []Action
func (*EditScript) Add ¶
func (es *EditScript) Add(a Action)
func (*EditScript) Size ¶
func (es *EditScript) Size() int
Click to show internal directories.
Click to hide internal directories.