Skip to content

Commit

Permalink
feat: added FunctionSymbol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shruti2522 committed Jun 2, 2024
1 parent c07925f commit 2ba6c9d
Show file tree
Hide file tree
Showing 18 changed files with 508 additions and 278 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 2ba6c9d

Please sign in to comment.