Skip to content

Commit

Permalink
feat: distinguish highlight for function symbol and normal var symbol (
Browse files Browse the repository at this point in the history
…#1386)

* feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

add function symbol kind to lsp

Signed-off-by: shruti2522 <[email protected]>

update function symbol def

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

fix ci

Signed-off-by: shruti2522 <[email protected]>

fix ci

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

add tests to sema_token

Signed-off-by: shruti2522 <[email protected]>

add get_function_symbol

Signed-off-by: shruti2522 <[email protected]>

highlight for func call

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

modify walk_call_expr

Signed-off-by: shruti2522 <[email protected]>

update namer for func_name

Signed-off-by: shruti2522 <[email protected]>

feat: distinguish highlight for func symbol and normal var symbol

Signed-off-by: shruti2522 <[email protected]>

update alloc_function_symbol

Signed-off-by: shruti2522 <[email protected]>

function symbol for builtin functions

Signed-off-by: shruti2522 <[email protected]>

update function symbol def

Signed-off-by: shruti2522 <[email protected]>

delete test.log

Signed-off-by: shruti2522 <[email protected]>

remove func symbol from walk_call_expr

Signed-off-by: shruti2522 <[email protected]>

update walk_call_expr for namer

Signed-off-by: shruti2522 <[email protected]>

update sema test

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

add function symbol kind in global state

Signed-off-by: shruti2522 <[email protected]>

update hover to handle func symbolkind

Signed-off-by: shruti2522 <[email protected]>

add condition for symbolkind in hover

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

remove print statements

Signed-off-by: shruti2522 <[email protected]>

update loader snapshots

Signed-off-by: shruti2522 <[email protected]>

fix advanced resolver

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

update assign stmt for lambda expr

Signed-off-by: shruti2522 <[email protected]>

update resolve_names for identifier_expr

Signed-off-by: shruti2522 <[email protected]>

update semantic tokens with function type

Signed-off-by: shruti2522 <[email protected]>

feat: api list_variables supports get variables from multi-files (#1389)

* feat: api list_variables supports get variables from multi-files

Signed-off-by: zongz <[email protected]>

* fix: fix CR comments

Signed-off-by: zongz <[email protected]>

* fix: fix test cases

Signed-off-by: zongz <[email protected]>

---------

Signed-off-by: zongz <[email protected]>

feat: advance resolver incremental compile (#1209)

feat: advanced resolver incremental compile. 1. Namer and Advanced Resolver support incremental compilation, clear cache by pkg and only update new pkg
2. Add gs cache in lsp state
3. Namer and Advanced Resolver modify gs in place(&mut) to reduce clone

Signed-off-by: he1pa <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

resolve conflicts

Signed-off-by: shruti2522 <[email protected]>

resolve conflicts

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

resolve conflicts

Signed-off-by: shruti2522 <[email protected]>

remove duplicate code

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

remove repititions

Signed-off-by: shruti2522 <[email protected]>

fmt check

Signed-off-by: shruti2522 <[email protected]>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <[email protected]>

* remove unwanted changes in global_state

Signed-off-by: shruti2522 <[email protected]>

remove unwanted changes in global_state

Signed-off-by: shruti2522 <[email protected]>

* fmt check

Signed-off-by: shruti2522 <[email protected]>

---------

Signed-off-by: shruti2522 <[email protected]>
  • Loading branch information
shruti2522 authored Jun 3, 2024
1 parent 61477e8 commit 3e40c8f
Show file tree
Hide file tree
Showing 16 changed files with 513 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 165,
index: 0,
generation: 0,
},
kind: Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 165,
index: 0,
generation: 0,
},
kind: Value,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: loader/src/tests.rs
assertion_line: 27
expression: "format!(\"{:#?}\", p.symbols.values())"
---
[
Expand Down Expand Up @@ -38,7 +39,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 165,
index: 0,
generation: 0,
},
kind: Value,
Expand Down
61 changes: 31 additions & 30 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_0.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: loader/src/tests.rs
assertion_line: 37
expression: "format!(\"{:#?}\", p.symbols.values())"
---
[
Expand Down Expand Up @@ -46,7 +47,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
index: 1,
generation: 0,
},
kind: Value,
kind: Function,
},
),
attrs: [],
Expand Down Expand Up @@ -93,203 +94,203 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
index: 136,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 137,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 138,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 139,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 140,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 146,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 147,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 148,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 149,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 150,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 151,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 152,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 153,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 154,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 155,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 156,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 159,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 160,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 163,
generation: 0,
},
kind: Value,
kind: Function,
},
SymbolRef {
id: Index {
index: 164,
generation: 0,
},
kind: Value,
kind: Function,
},
],
is_global: false,
Expand Down
Loading

0 comments on commit 3e40c8f

Please sign in to comment.