Skip to content

Commit

Permalink
test: update API tests on the assign index target
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Jul 19, 2024
1 parent 3612087 commit d6d1146
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions kclvm/api/src/service/capi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ pub(crate) fn kclvm_get_service_fn_ptr_by_name(name: &str) -> u64 {
"KclvmService.ListOptions" => list_options as *const () as u64,
"KclvmService.ListVariables" => list_variables as *const () as u64,
"KclvmService.ExecProgram" => exec_program as *const () as u64,
#[cfg(feature = "llvm")]
"KclvmService.BuildProgram" => build_program as *const () as u64,
#[cfg(feature = "llvm")]
"KclvmService.ExecArtifact" => exec_artifact as *const () as u64,
"KclvmService.OverrideFile" => override_file as *const () as u64,
"KclvmService.GetSchemaTypeMapping" => get_schema_type_mapping as *const () as u64,
Expand Down Expand Up @@ -373,6 +375,7 @@ pub(crate) fn exec_program(
///
/// result: [*const c_char]
/// Result of the call serialized as protobuf byte sequence
#[cfg(feature = "llvm")]
pub(crate) fn build_program(
serv: *mut kclvm_service,
args: *const c_char,
Expand All @@ -397,6 +400,7 @@ pub(crate) fn build_program(
///
/// result: [*const c_char]
/// Result of the call serialized as protobuf byte sequence
#[cfg(feature = "llvm")]
pub(crate) fn exec_artifact(
serv: *mut kclvm_service,
args: *const c_char,
Expand Down
2 changes: 2 additions & 0 deletions kclvm/api/src/service/jsonrpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ fn register_kclvm_service(io: &mut IoHandler) {
};
futures::future::ready(catch!(kclvm_service_impl, args, exec_program))
});
#[cfg(feature = "llvm")]
io.add_method("KclvmService.BuildProgram", |params: Params| {
let kclvm_service_impl = KclvmServiceImpl::default();
let args: BuildProgramArgs = match params.parse() {
Expand All @@ -131,6 +132,7 @@ fn register_kclvm_service(io: &mut IoHandler) {
};
futures::future::ready(catch!(kclvm_service_impl, args, build_program))
});
#[cfg(feature = "llvm")]
io.add_method("KclvmService.ExecArtifact", |params: Params| {
let kclvm_service_impl = KclvmServiceImpl::default();
let args: ExecArtifactArgs = match params.parse() {
Expand Down
4 changes: 4 additions & 0 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ use kclvm_query::query::get_full_schema_type;
use kclvm_query::query::CompilationOptions;
use kclvm_query::selector::{list_variables, ListOptions};
use kclvm_query::GetSchemaOption;
#[cfg(feature = "llvm")]
use kclvm_runner::{build_program, exec_artifact, exec_program};
use kclvm_runner::exec_program;
use kclvm_sema::core::global_state::GlobalState;
use kclvm_sema::resolver::scope::KCLScopeCache;
use kclvm_sema::resolver::Options;
Expand Down Expand Up @@ -507,6 +509,7 @@ impl KclvmServiceImpl {
/// }).unwrap();
/// assert!(!artifact.path.is_empty());
/// ```
#[cfg(feature = "llvm")]
pub fn build_program(&self, args: &BuildProgramArgs) -> anyhow::Result<BuildProgramResult> {
let exec_args = transform_exec_para(&args.exec_args, self.plugin_agent)?;
let artifact = build_program(
Expand Down Expand Up @@ -548,6 +551,7 @@ impl KclvmServiceImpl {
/// assert_eq!(exec_result.err_message, "");
/// assert_eq!(exec_result.yaml_result, "alice:\n age: 18");
/// ```
#[cfg(feature = "llvm")]
pub fn exec_artifact(&self, args: &ExecArtifactArgs) -> anyhow::Result<ExecProgramResult> {
let exec_args = transform_exec_para(&args.exec_args, self.plugin_agent)?;
let result = exec_artifact(&args.path, &exec_args)?;
Expand Down
2 changes: 1 addition & 1 deletion kclvm/api/src/testdata/parse-file.response.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ast_json": "{\"filename\":\"source.k\",\"pkg\":\"__main__\",\"doc\":null,\"name\":\"__main__\",\"body\":[{\"node\":{\"type\":\"Import\",\"path\":{\"node\":\"units\",\"filename\":\"source.k\",\"line\":1,\"column\":7,\"end_line\":1,\"end_column\":12},\"rawpath\":\"units\",\"name\":\"units\",\"asname\":null,\"pkg_name\":\"__main__\"},\"filename\":\"source.k\",\"line\":1,\"column\":0,\"end_line\":1,\"end_column\":12},{\"node\":{\"type\":\"Import\",\"path\":{\"node\":\"data.cloud\",\"filename\":\"source.k\",\"line\":2,\"column\":7,\"end_line\":2,\"end_column\":17},\"rawpath\":\"data.cloud\",\"name\":\"cloud_pkg\",\"asname\":{\"node\":\"cloud_pkg\",\"filename\":\"source.k\",\"line\":2,\"column\":21,\"end_line\":2,\"end_column\":30},\"pkg_name\":\"__main__\"},\"filename\":\"source.k\",\"line\":2,\"column\":0,\"end_line\":2,\"end_column\":30},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"data1\",\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":5},\"paths\":[]},\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":5}],\"value\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"NumberLit\",\"binary_suffix\":null,\"value\":{\"type\":\"Int\",\"value\":32}},\"filename\":\"source.k\",\"line\":4,\"column\":8,\"end_line\":4,\"end_column\":10},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"units\",\"filename\":\"source.k\",\"line\":4,\"column\":13,\"end_line\":4,\"end_column\":18},{\"node\":\"Ki\",\"filename\":\"source.k\",\"line\":4,\"column\":19,\"end_line\":4,\"end_column\":21}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":4,\"column\":13,\"end_line\":4,\"end_column\":21}},\"filename\":\"source.k\",\"line\":4,\"column\":8,\"end_line\":4,\"end_column\":21},\"ty\":null},\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":21},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"Data2\",\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":5},\"paths\":[]},\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":5}],\"value\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"NumberLit\",\"binary_suffix\":null,\"value\":{\"type\":\"Int\",\"value\":42}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":10},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"units\",\"filename\":\"source.k\",\"line\":5,\"column\":13,\"end_line\":5,\"end_column\":18},{\"node\":\"Ki\",\"filename\":\"source.k\",\"line\":5,\"column\":19,\"end_line\":5,\"end_column\":21}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":5,\"column\":13,\"end_line\":5,\"end_column\":21}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":21},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"cloud_pkg\",\"filename\":\"source.k\",\"line\":5,\"column\":24,\"end_line\":5,\"end_column\":33},{\"node\":\"Foo\",\"filename\":\"source.k\",\"line\":5,\"column\":34,\"end_line\":5,\"end_column\":37}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":5,\"column\":24,\"end_line\":5,\"end_column\":37}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":37},\"ty\":null},\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":37},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"lambda1\",\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":7,\"end_column\":7},\"paths\":[]},\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":7,\"end_column\":7}],\"value\":{\"node\":{\"type\":\"Lambda\",\"args\":{\"node\":{\"args\":[{\"node\":{\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":18}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":18},{\"node\":{\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":7,\"column\":25,\"end_line\":7,\"end_column\":26}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":7,\"column\":25,\"end_line\":7,\"end_column\":26}],\"defaults\":[null,null],\"ty_list\":[{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":20,\"end_line\":7,\"end_column\":23},{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":28,\"end_line\":7,\"end_column\":31}]},\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":31},\"body\":[{\"node\":{\"type\":\"Expr\",\"exprs\":[{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":5}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":5},\"op\":\"Sub\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":8,\"column\":8,\"end_line\":8,\"end_column\":9}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":8,\"column\":8,\"end_line\":8,\"end_column\":9}},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":9}]},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":9}],\"return_ty\":{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":35,\"end_line\":7,\"end_column\":38}},\"filename\":\"source.k\",\"line\":7,\"column\":10,\"end_line\":9,\"end_column\":1},\"ty\":null},\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":9,\"end_column\":1},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"Lambda2\",\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":10,\"end_column\":7},\"paths\":[]},\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":10,\"end_column\":7}],\"value\":{\"node\":{\"type\":\"Lambda\",\"args\":{\"node\":{\"args\":[{\"node\":{\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":18}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":18},{\"node\":{\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":10,\"column\":25,\"end_line\":10,\"end_column\":26}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":10,\"column\":25,\"end_line\":10,\"end_column\":26}],\"defaults\":[null,null],\"ty_list\":[{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":20,\"end_line\":10,\"end_column\":23},{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":28,\"end_line\":10,\"end_column\":31}]},\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":31},\"body\":[{\"node\":{\"type\":\"Expr\",\"exprs\":[{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":5}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":5},\"op\":\"Add\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":11,\"column\":8,\"end_line\":11,\"end_column\":9}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":11,\"column\":8,\"end_line\":11,\"end_column\":9}},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":9}]},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":9}],\"return_ty\":{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":35,\"end_line\":10,\"end_column\":38}},\"filename\":\"source.k\",\"line\":10,\"column\":10,\"end_line\":12,\"end_column\":1},\"ty\":null},\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":12,\"end_column\":1}],\"comments\":[]}",
"ast_json": "{\"filename\":\"source.k\",\"pkg\":\"__main__\",\"doc\":null,\"name\":\"__main__\",\"body\":[{\"node\":{\"type\":\"Import\",\"path\":{\"node\":\"units\",\"filename\":\"source.k\",\"line\":1,\"column\":7,\"end_line\":1,\"end_column\":12},\"rawpath\":\"units\",\"name\":\"units\",\"asname\":null,\"pkg_name\":\"__main__\"},\"filename\":\"source.k\",\"line\":1,\"column\":0,\"end_line\":1,\"end_column\":12},{\"node\":{\"type\":\"Import\",\"path\":{\"node\":\"data.cloud\",\"filename\":\"source.k\",\"line\":2,\"column\":7,\"end_line\":2,\"end_column\":17},\"rawpath\":\"data.cloud\",\"name\":\"cloud_pkg\",\"asname\":{\"node\":\"cloud_pkg\",\"filename\":\"source.k\",\"line\":2,\"column\":21,\"end_line\":2,\"end_column\":30},\"pkg_name\":\"__main__\"},\"filename\":\"source.k\",\"line\":2,\"column\":0,\"end_line\":2,\"end_column\":30},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"data1\",\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":5},\"paths\":[],\"pkgpath\":\"\"},\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":5}],\"value\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"NumberLit\",\"binary_suffix\":null,\"value\":{\"type\":\"Int\",\"value\":32}},\"filename\":\"source.k\",\"line\":4,\"column\":8,\"end_line\":4,\"end_column\":10},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"units\",\"filename\":\"source.k\",\"line\":4,\"column\":13,\"end_line\":4,\"end_column\":18},{\"node\":\"Ki\",\"filename\":\"source.k\",\"line\":4,\"column\":19,\"end_line\":4,\"end_column\":21}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":4,\"column\":13,\"end_line\":4,\"end_column\":21}},\"filename\":\"source.k\",\"line\":4,\"column\":8,\"end_line\":4,\"end_column\":21},\"ty\":null},\"filename\":\"source.k\",\"line\":4,\"column\":0,\"end_line\":4,\"end_column\":21},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"Data2\",\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":5},\"paths\":[],\"pkgpath\":\"\"},\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":5}],\"value\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"NumberLit\",\"binary_suffix\":null,\"value\":{\"type\":\"Int\",\"value\":42}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":10},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"units\",\"filename\":\"source.k\",\"line\":5,\"column\":13,\"end_line\":5,\"end_column\":18},{\"node\":\"Ki\",\"filename\":\"source.k\",\"line\":5,\"column\":19,\"end_line\":5,\"end_column\":21}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":5,\"column\":13,\"end_line\":5,\"end_column\":21}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":21},\"op\":\"Mul\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"cloud_pkg\",\"filename\":\"source.k\",\"line\":5,\"column\":24,\"end_line\":5,\"end_column\":33},{\"node\":\"Foo\",\"filename\":\"source.k\",\"line\":5,\"column\":34,\"end_line\":5,\"end_column\":37}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":5,\"column\":24,\"end_line\":5,\"end_column\":37}},\"filename\":\"source.k\",\"line\":5,\"column\":8,\"end_line\":5,\"end_column\":37},\"ty\":null},\"filename\":\"source.k\",\"line\":5,\"column\":0,\"end_line\":5,\"end_column\":37},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"lambda1\",\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":7,\"end_column\":7},\"paths\":[],\"pkgpath\":\"\"},\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":7,\"end_column\":7}],\"value\":{\"node\":{\"type\":\"Lambda\",\"args\":{\"node\":{\"args\":[{\"node\":{\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":18}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":18},{\"node\":{\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":7,\"column\":25,\"end_line\":7,\"end_column\":26}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":7,\"column\":25,\"end_line\":7,\"end_column\":26}],\"defaults\":[null,null],\"ty_list\":[{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":20,\"end_line\":7,\"end_column\":23},{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":28,\"end_line\":7,\"end_column\":31}]},\"filename\":\"source.k\",\"line\":7,\"column\":17,\"end_line\":7,\"end_column\":31},\"body\":[{\"node\":{\"type\":\"Expr\",\"exprs\":[{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":5}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":5},\"op\":\"Sub\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":8,\"column\":8,\"end_line\":8,\"end_column\":9}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":8,\"column\":8,\"end_line\":8,\"end_column\":9}},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":9}]},\"filename\":\"source.k\",\"line\":8,\"column\":4,\"end_line\":8,\"end_column\":9}],\"return_ty\":{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":7,\"column\":35,\"end_line\":7,\"end_column\":38}},\"filename\":\"source.k\",\"line\":7,\"column\":10,\"end_line\":9,\"end_column\":1},\"ty\":null},\"filename\":\"source.k\",\"line\":7,\"column\":0,\"end_line\":9,\"end_column\":1},{\"node\":{\"type\":\"Assign\",\"targets\":[{\"node\":{\"name\":{\"node\":\"Lambda2\",\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":10,\"end_column\":7},\"paths\":[],\"pkgpath\":\"\"},\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":10,\"end_column\":7}],\"value\":{\"node\":{\"type\":\"Lambda\",\"args\":{\"node\":{\"args\":[{\"node\":{\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":18}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":18},{\"node\":{\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":10,\"column\":25,\"end_line\":10,\"end_column\":26}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":10,\"column\":25,\"end_line\":10,\"end_column\":26}],\"defaults\":[null,null],\"ty_list\":[{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":20,\"end_line\":10,\"end_column\":23},{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":28,\"end_line\":10,\"end_column\":31}]},\"filename\":\"source.k\",\"line\":10,\"column\":17,\"end_line\":10,\"end_column\":31},\"body\":[{\"node\":{\"type\":\"Expr\",\"exprs\":[{\"node\":{\"type\":\"Binary\",\"left\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"x\",\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":5}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":5},\"op\":\"Add\",\"right\":{\"node\":{\"type\":\"Identifier\",\"names\":[{\"node\":\"y\",\"filename\":\"source.k\",\"line\":11,\"column\":8,\"end_line\":11,\"end_column\":9}],\"pkgpath\":\"\",\"ctx\":\"Load\"},\"filename\":\"source.k\",\"line\":11,\"column\":8,\"end_line\":11,\"end_column\":9}},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":9}]},\"filename\":\"source.k\",\"line\":11,\"column\":4,\"end_line\":11,\"end_column\":9}],\"return_ty\":{\"node\":{\"type\":\"Basic\",\"value\":\"Int\"},\"filename\":\"source.k\",\"line\":10,\"column\":35,\"end_line\":10,\"end_column\":38}},\"filename\":\"source.k\",\"line\":10,\"column\":10,\"end_line\":12,\"end_column\":1},\"ty\":null},\"filename\":\"source.k\",\"line\":10,\"column\":0,\"end_line\":12,\"end_column\":1}],\"comments\":[]}",
"deps": [],
"errors": [
{
Expand Down

0 comments on commit d6d1146

Please sign in to comment.