-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
12 changed files
with
133 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"file": "./src/testdata/variables/main.k", | ||
"files": ["./src/testdata/variables/main.k"], | ||
"specs": ["a", "b", "c"] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/kcl.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
name = "test_list_merged_variables" | ||
edition = "v0.9.0" | ||
version = "0.0.1" | ||
|
11 changes: 11 additions & 0 deletions
11
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/override/base.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
import test | ||
|
||
_tests = test.Test { | ||
pots: [ | ||
test.Pot { | ||
name: "http" | ||
number: 90 | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/override/main.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
import test | ||
|
||
_tests = test.Test { | ||
aType: "Internet" | ||
} |
7 changes: 7 additions & 0 deletions
7
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/test.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
schema Pot: | ||
name: str | ||
number: int | ||
|
||
schema Test: | ||
aType?: str | ||
pots?: [Pot] |
11 changes: 11 additions & 0 deletions
11
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/union/base.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
import test | ||
|
||
tests = test.Test { | ||
pots: [ | ||
test.Pot { | ||
name: "http" | ||
number: 90 | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
kclvm/query/src/test_data/test_list_variables/test_list_merged_variables/union/main.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
import test | ||
|
||
tests : test.Test { | ||
aType: "Internet" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters