Skip to content

feat: DSL parser + AST implementation #122

feat: DSL parser + AST implementation

feat: DSL parser + AST implementation #122

Triggered via pull request February 10, 2025 01:08
Status Success
Total duration 2m 56s
Artifacts

test.yml

on: pull_request
ubuntu / stable / minimal-versions
48s
ubuntu / stable / minimal-versions
ubuntu / stable / coverage
52s
ubuntu / stable / coverage
Matrix: os-check
Matrix: required
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 2 warnings
[clippy] optd-core/src/dsl/parser/functions.rs#L94: optd-core/src/dsl/parser/functions.rs#L94
error: this loop never actually loops --> optd-core/src/dsl/parser/functions.rs:94:5 | 94 | / for annot_inner_pair in pair.into_inner() { 95 | | return Some(match annot_inner_pair.as_str() { 96 | | "Scalar" => OperatorKind::Scalar, 97 | | "Logical" => OperatorKind::Logical, 98 | | _ => unreachable!("Unexpected rule type: {}", annot_inner_pair.as_str()), 99 | | }); 100 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop = note: `#[deny(clippy::never_loop)]` on by default help: if you need the first element of the iterator, try writing | 94 | if let Some(annot_inner_pair) = pair.into_inner().next() { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[clippy] optd-core/src/dsl/parser/functions.rs#L94: optd-core/src/dsl/parser/functions.rs#L94
error: this loop never actually loops --> optd-core/src/dsl/parser/functions.rs:94:5 | 94 | / for annot_inner_pair in pair.into_inner() { 95 | | return Some(match annot_inner_pair.as_str() { 96 | | "Scalar" => OperatorKind::Scalar, 97 | | "Logical" => OperatorKind::Logical, 98 | | _ => unreachable!("Unexpected rule type: {}", annot_inner_pair.as_str()), 99 | | }); 100 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#never_loop = note: `#[deny(clippy::never_loop)]` on by default help: if you need the first element of the iterator, try writing | 94 | if let Some(annot_inner_pair) = pair.into_inner().next() { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[clippy] optd-core/src/dsl/parser/mod.rs#L30: optd-core/src/dsl/parser/mod.rs#L30
warning: the `Err`-variant returned from this function is very large --> optd-core/src/dsl/parser/mod.rs:30:35 | 30 | pub fn parse_file(input: &str) -> Result<File, Error<Rule>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 272 bytes | = help: try reducing the size of `pest::error::Error<dsl::parser::Rule>`, for example by boxing large elements or replacing it with `Box<pest::error::Error<dsl::parser::Rule>>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default
[clippy] optd-core/src/dsl/parser/mod.rs#L30: optd-core/src/dsl/parser/mod.rs#L30
warning: the `Err`-variant returned from this function is very large --> optd-core/src/dsl/parser/mod.rs:30:35 | 30 | pub fn parse_file(input: &str) -> Result<File, Error<Rule>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 272 bytes | = help: try reducing the size of `pest::error::Error<dsl::parser::Rule>`, for example by boxing large elements or replacing it with `Box<pest::error::Error<dsl::parser::Rule>>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default