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 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

add function symbol kind to lsp

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update function symbol def

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fix ci

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fix ci

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

add tests to sema_token

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

add get_function_symbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

highlight for func call

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

modify walk_call_expr

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update namer for func_name

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: distinguish highlight for func symbol and normal var symbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update alloc_function_symbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

function symbol for builtin functions

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update function symbol def

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

delete test.log

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

remove func symbol from walk_call_expr

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update walk_call_expr for namer

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update sema test

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

add function symbol kind in global state

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update hover to handle func symbolkind

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

add condition for symbolkind in hover

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

remove print statements

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update loader snapshots

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fix advanced resolver

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update assign stmt for lambda expr

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update resolve_names for identifier_expr

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

update semantic tokens with function type

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

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 <zongzhe1024@163.com>

* fix: fix CR comments

Signed-off-by: zongz <zongzhe1024@163.com>

* fix: fix test cases

Signed-off-by: zongz <zongzhe1024@163.com>

---------

Signed-off-by: zongz <zongzhe1024@163.com>

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 <18012015693@163.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

resolve conflicts

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

resolve conflicts

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

resolve conflicts

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

remove duplicate code

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

remove repititions

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

feat: added FunctionSymbol

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

* remove unwanted changes in global_state

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

remove unwanted changes in global_state

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

* fmt check

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>

---------

Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
  • 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.