Skip to content

Commit 37be49b

Browse files
committed
update to latest parser update
1 parent d4cefa4 commit 37be49b

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/DDP-Projekt/DDPLS
33
go 1.18
44

55
require (
6-
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230918114606-e6176aad1b7b
6+
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230922143518-be8902c28e76
77
github.com/tliron/glsp v0.1.2-0.20220628161923-1d70ae869611
88
github.com/tliron/kutil v0.1.68
99
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230918114606-e6176aad1b7b h1:ZSEmjFUsEFT+odKTz3KABtswjgiRhc1/IxGRgdQAYpM=
22
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230918114606-e6176aad1b7b/go.mod h1:OVRSCZNQ8LVV8ZH5TuAGTaf0skO06bgV5Y7Wgvdb+NY=
3+
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230922143518-be8902c28e76 h1:XEnvK+EzN1yZhZyxSE1qNQdmtwZ0FJPyzbLAuRzRFV8=
4+
github.com/DDP-Projekt/Kompilierer v0.0.8-pre.0.20230922143518-be8902c28e76/go.mod h1:OVRSCZNQ8LVV8ZH5TuAGTaf0skO06bgV5Y7Wgvdb+NY=
35
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
46
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
57
github.com/bafto/glsp v0.1.2-0.20230806091905-942e1aee0810 h1:SqEtvmrp0wqvKYw9J7DSvnMM8l12cDj98k8vKlVB/7U=

handlers/completion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ var (
147147
)
148148

149149
func aliasToCompletionItem(alias ast.FuncAlias) protocol.CompletionItem {
150-
insertText := ast.TrimStringLit(alias.Original) // remove the ""
150+
insertText := ast.TrimStringLit(&alias.Original) // remove the ""
151151
details := insertText
152152
insertTextMode := protocol.InsertTextFormatPlainText
153153
if SupportsSnippets {
@@ -271,7 +271,7 @@ func (vis *importVisitor) VisitImportStmt(imprt *ast.ImportStmt) {
271271
// are in an import path
272272
*vis.items = make([]protocol.CompletionItem, 0, len(dudenPaths))
273273

274-
incompletePath := filepath.Dir(ast.TrimStringLit(imprt.FileName))
274+
incompletePath := filepath.Dir(ast.TrimStringLit(&imprt.FileName))
275275

276276
if incompletePath == "." {
277277
addDudenPaths(vis.items)

handlers/hover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (h *hoverVisitor) VisitFuncCall(e *ast.FuncCall) {
9797
var declRange protocol.Range
9898

9999
if fun.Body != nil {
100-
declRange = helper.ToProtocolRange(token.NewRange(fun.Tok, fun.Body.Colon))
100+
declRange = helper.ToProtocolRange(token.NewRange(&fun.Tok, &fun.Body.Colon))
101101
} else {
102102
declRange = helper.ToProtocolRange(fun.GetRange())
103103
}

handlers/semanticHighlighting.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ func (t *semanticTokenizer) add(tok highlightedToken) {
122122
}
123123

124124
func (t *semanticTokenizer) VisitVarDecl(d *ast.VarDecl) {
125-
t.add(newHightlightedToken(token.NewRange(d.NameTok, d.NameTok), t.doc, protocol.SemanticTokenTypeVariable, nil))
125+
t.add(newHightlightedToken(token.NewRange(&d.NameTok, &d.NameTok), t.doc, protocol.SemanticTokenTypeVariable, nil))
126126
}
127127
func (t *semanticTokenizer) VisitFuncDecl(d *ast.FuncDecl) {
128-
t.add(newHightlightedToken(token.NewRange(d.NameTok, d.NameTok), t.doc, protocol.SemanticTokenTypeVariable, nil))
128+
t.add(newHightlightedToken(token.NewRange(&d.NameTok, &d.NameTok), t.doc, protocol.SemanticTokenTypeVariable, nil))
129129
for _, param := range d.ParamNames {
130-
t.add(newHightlightedToken(token.NewRange(param, param), t.doc, protocol.SemanticTokenTypeParameter, nil))
130+
t.add(newHightlightedToken(token.NewRange(&param, &param), t.doc, protocol.SemanticTokenTypeParameter, nil))
131131
}
132132
}
133133

0 commit comments

Comments
 (0)