Documentation ¶
Index ¶
- type CommentPosition
- type Ctx
- func (c *Ctx) Advance() bool
- func (c *Ctx) ClassScope() ast.Vertex
- func (c *Ctx) Current() ast.Vertex
- func (c *Ctx) DirectlyWrappedBy(kind ast.Type) bool
- func (c *Ctx) DirectlyWraps(kind ast.Type) bool
- func (c *Ctx) InComment() (*token.Token, CommentPosition)
- func (c *Ctx) Path() string
- func (c *Ctx) Position() *position.Position
- func (c *Ctx) Root() *ast.Root
- func (c *Ctx) Scope() ast.Vertex
- func (c *Ctx) Start() *position.Position
- func (c *Ctx) WrappedBy(kind ast.Type) bool
- func (c *Ctx) Wraps(kind ast.Type) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentPosition ¶
type CommentPosition int
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) Advance ¶
Advances to the next wrapped node, returning whether there was a node to advance to.
func (*Ctx) ClassScope ¶
The next scope of the current node, but only the class-like nodes.
func (*Ctx) DirectlyWrappedBy ¶
Whether the current node directly is wrapped by the given kind.
func (*Ctx) DirectlyWraps ¶
Whether the current node directly wraps the given node kind.
func (*Ctx) InComment ¶
func (c *Ctx) InComment() (*token.Token, CommentPosition)
Returns the token of the comment if the cursor is in a comment. Otherwise nil. The second return value is the index of the cursor into the comment.
Click to show internal directories.
Click to hide internal directories.