Skip to content

Commit

Permalink
feat: add file.size (#1286)
Browse files Browse the repository at this point in the history
* initial commit

Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com>

* updation on kclvm.h

Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com>

* added test

Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com>

* config username-email

Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>

* changed type and added stdout.golden

Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>

* updated tests

Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>

---------

Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com>
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
  • Loading branch information
JeevaRamanathan authored May 7, 2024
1 parent fced89a commit 7703eec
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 114 deletions.
6 changes: 3 additions & 3 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ impl KclvmServiceImpl {
/// assert_eq!(result.type_errors.len(), 0);
/// assert_eq!(result.symbols.len(), 12);
/// assert_eq!(result.scopes.len(), 3);
/// assert_eq!(result.node_symbol_map.len(), 173);
/// assert_eq!(result.symbol_node_map.len(), 173);
/// assert_eq!(result.fully_qualified_name_map.len(), 182);
/// assert_eq!(result.node_symbol_map.len(), 175);
/// assert_eq!(result.symbol_node_map.len(), 175);
/// assert_eq!(result.fully_qualified_name_map.len(), 184);
/// assert_eq!(result.pkg_scope_map.len(), 3);
/// ```
#[inline]
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: 161,
index: 163,
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: 161,
index: 163,
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: 161,
index: 163,
generation: 0,
},
kind: Value,
Expand Down
28 changes: 14 additions & 14 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_0.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 132,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 133,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 134,
Expand Down Expand Up @@ -291,6 +277,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down
90 changes: 45 additions & 45 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_1.snap
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: 161,
index: 163,
generation: 0,
},
kind: Value,
Expand Down Expand Up @@ -180,20 +180,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 132,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 133,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 134,
Expand Down Expand Up @@ -383,6 +369,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -415,27 +415,13 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 162,
index: 164,
generation: 0,
},
kind: Value,
},
),
attrs: [
SymbolRef {
id: Index {
index: 132,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 133,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 134,
Expand Down Expand Up @@ -625,6 +611,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -664,20 +664,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 132,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 133,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 134,
Expand Down Expand Up @@ -867,6 +853,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 161,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 162,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -899,7 +899,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 163,
index: 165,
generation: 0,
},
kind: Value,
Expand Down
Loading

0 comments on commit 7703eec

Please sign in to comment.