forked from KurokuLabs/margo
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cursor.go
46 lines (38 loc) · 1.35 KB
/
cursor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package golang
import (
"margo.sh/golang/cursor"
"margo.sh/mg"
)
const (
AssignmentScope = cursor.AssignmentScope
BlockScope = cursor.BlockScope
CommentScope = cursor.CommentScope
ConstScope = cursor.ConstScope
DeferScope = cursor.DeferScope
DocScope = cursor.DocScope
ExprScope = cursor.ExprScope
FileScope = cursor.FileScope
FuncDeclScope = cursor.FuncDeclScope
IdentScope = cursor.IdentScope
ImportPathScope = cursor.ImportPathScope
ImportScope = cursor.ImportScope
PackageScope = cursor.PackageScope
ReturnScope = cursor.ReturnScope
SelectorScope = cursor.SelectorScope
StringScope = cursor.StringScope
TypeDeclScope = cursor.TypeDeclScope
VarScope = cursor.VarScope
)
type CursorScope = cursor.CurScope
type CompletionScope = CursorScope
type DocNode = cursor.DocNode
type CompletionCtx = CursorCtx
type CursorCtx = cursor.CurCtx
// NewCompletionCtx is an alias of cursor.NewCurCtx
func NewCompletionCtx(mx *mg.Ctx, src []byte, pos int) *CompletionCtx {
return cursor.NewCurCtx(mx, src, pos)
}
// NewViewCursorCtx is an alias of cursor.NewViewCurCtx
func NewViewCursorCtx(mx *mg.Ctx) *CursorCtx { return cursor.NewViewCurCtx(mx) }
// NewCursorCtx is an alias of cursor.NewCurCtx
func NewCursorCtx(mx *mg.Ctx, src []byte, pos int) *CursorCtx { return cursor.NewCurCtx(mx, src, pos) }