Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -30,6 +32,8 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -45,6 +49,8 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -63,6 +69,8 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libs/antlr4rust"]
path = libs/antlr4rust
url = [email protected]:dyn-tracing/antlr4rust.git
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = { version = "1.0", features = ["derive"] }
strum = "0.19"
strum_macros = "0.19"
indexmap = { version = "1.6.1", features = ["serde-1"] }
antlr-rust = "=0.2"
antlr-rust = { path = "./libs/antlr4rust" }
input-stream = "0.3.0"

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions libs/antlr4rust
Submodule antlr4rust added at ae3021
6 changes: 3 additions & 3 deletions src/codegen_envoy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ fn make_return_block(
&call.id,
id_to_property,
),
_ => make_storage_rpc_value_from_target(&node, &call.id, id_to_property),
_ => make_storage_rpc_value_from_target(node, &call.id, id_to_property),
}
}
}
Expand All @@ -250,7 +250,7 @@ fn make_aggr_block(
) -> String {
let mut to_return = String::new();
for arg in &agg.args {
to_return.push_str(&make_return_block(&arg, query_data, id_to_property));
to_return.push_str(&make_return_block(arg, query_data, id_to_property));
}
to_return
}
Expand Down Expand Up @@ -559,7 +559,7 @@ pub fn generate_code_blocks(query_data: VisitorResults, udf_paths: Vec<String>)
make_return_block(entity_ref, &query_data, &code_struct.id_to_property)
}
IrReturnEnum::Aggregate(ref agg) => {
make_aggr_block(&agg, &query_data, &code_struct.id_to_property)
make_aggr_block(agg, &query_data, &code_struct.id_to_property)
}
};
code_struct.response_blocks.push(resp_block);
Expand Down
6 changes: 3 additions & 3 deletions src/codegen_simulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn make_return_block(
&call.id,
id_to_property,
),
_ => make_storage_rpc_value_from_target(&node, &call.id, id_to_property),
_ => make_storage_rpc_value_from_target(node, &call.id, id_to_property),
}
}
}
Expand All @@ -233,7 +233,7 @@ fn make_aggr_block(
) -> String {
let mut to_return = String::new();
for arg in &agg.args {
to_return.push_str(&make_return_block(&arg, query_data, id_to_property));
to_return.push_str(&make_return_block(arg, query_data, id_to_property));
}
to_return
}
Expand Down Expand Up @@ -362,7 +362,7 @@ pub fn generate_code_blocks(query_data: VisitorResults, udf_paths: Vec<String>)
make_return_block(entity_ref, &query_data, &code_struct.id_to_property)
}
IrReturnEnum::Aggregate(ref agg) => {
make_aggr_block(&agg, &query_data, &code_struct.id_to_property)
make_aggr_block(agg, &query_data, &code_struct.id_to_property)
}
};
code_struct.response_blocks.push(resp_block);
Expand Down
4 changes: 2 additions & 2 deletions src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Property {
let mut lst_str = "vec![".to_string();
for member in &self.members {
lst_str.push('\"');
lst_str.push_str(&member);
lst_str.push_str(member);
lst_str.push_str("\", ");
}
lst_str.push(']');
Expand All @@ -111,7 +111,7 @@ impl Property {
let mut udf_str = String::new();
if let Some((last, front)) = self.members.split_last() {
for member in front {
udf_str.push_str(&member);
udf_str.push_str(member);
udf_str.push('.');
}
udf_str.push_str(last);
Expand Down