Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add inlay hints for function call args #1473

Merged
merged 11 commits into from
Jul 10, 2024
Merged
249 changes: 246 additions & 3 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_2.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: loader/src/tests.rs
assertion_line: 39
expression: "format!(\"{:#?}\", p.symbols.values())"
---
[
Expand Down Expand Up @@ -346,6 +347,248 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
attrs: [],
is_global: false,
},
SymbolInfo {
Peefy marked this conversation as resolved.
Show resolved Hide resolved
ty: Type {
kind: StrLit(
"key",
),
is_type_alias: false,
flags: STR | LITERAL,
},
name: "key",
range: (
Position {
filename: "test.k",
line: 3,
column: Some(
8,
),
},
Position {
filename: "test.k",
line: 3,
column: Some(
13,
),
},
),
owner: None,
def: Some(
SymbolRef {
id: Index {
index: 4,
generation: 0,
},
kind: Value,
},
),
attrs: [
SymbolRef {
id: Index {
index: 137,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 138,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 139,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 140,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 146,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 147,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 148,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 149,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 150,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 151,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 152,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 153,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 154,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 155,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 156,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 159,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 160,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 163,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 164,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 165,
generation: 0,
},
kind: Function,
},
],
is_global: false,
},
SymbolInfo {
ty: Type {
kind: StrLit(
Expand Down Expand Up @@ -375,7 +618,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 0,
index: 2,
generation: 0,
},
kind: Expression,
Expand Down Expand Up @@ -859,7 +1102,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 1,
index: 0,
generation: 0,
},
kind: Expression,
Expand Down Expand Up @@ -1139,7 +1382,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 2,
index: 1,
generation: 0,
},
kind: Expression,
Expand Down
Loading
Loading