Skip to content

feat: Support building SLR Table #24

feat: Support building SLR Table

feat: Support building SLR Table #24

Triggered via pull request November 20, 2023 14:27
@Devin-YeungDevin-Yeung
opened #3
SLR
Status Success
Total duration 1m 0s
Artifacts

ci.yml

on: pull_request
stable / fmt
12s
stable / fmt
nightly / doc
19s
nightly / doc
ubuntu / stable / coverage
26s
ubuntu / stable / coverage
Spell Check
3s
Spell Check
Matrix: clippy
Matrix: os-check
Matrix: required
Fit to window
Zoom out
Zoom in

Annotations

9 warnings
you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>`: src/lr0/core.rs#L112
warning: you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>` --> src/lr0/core.rs:112:5 | 112 | / pub fn new() -> Self { 113 | | Self { 114 | | items: HashSet::new(), 115 | | } 116 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 111 + impl<'grammar> Default for LR0ItemSet<'grammar> { 112 + fn default() -> Self { 113 + Self::new() 114 + } 115 + } |
this lifetime isn't used in the function definition: src/lr0/core.rs#L44
warning: this lifetime isn't used in the function definition --> src/lr0/core.rs:44:23 | 44 | pub fn transition<'a>(&self, from: usize, via: &Term) -> Option<usize> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
struct `LR0Closure` has a public `len` method, but no `is_empty` method: src/lr0/core.rs#L40
warning: struct `LR0Closure` has a public `len` method, but no `is_empty` method --> src/lr0/core.rs:40:5 | 40 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` on by default
associated items `new`, `get_index_of`, and `get` are never used: src/slr/helper.rs#L10
warning: associated items `new`, `get_index_of`, and `get` are never used --> src/slr/helper.rs:10:12 | 9 | impl<'grammar> IndexedGrammar<'grammar> { | --------------------------------------- associated items in this implementation 10 | pub fn new(grammar: &'grammar Grammar) -> IndexedGrammar<'grammar> { | ^^^ ... 19 | pub fn get_index_of(&self, expr: &Expression) -> Option<usize> { | ^^^^^^^^^^^^ ... 23 | pub(crate) fn get(&self, expr: &Expression) -> Option<Production> { | ^^^
struct `IndexedGrammar` is never constructed: src/slr/helper.rs#L4
warning: struct `IndexedGrammar` is never constructed --> src/slr/helper.rs:4:12 | 4 | pub struct IndexedGrammar<'grammar> { | ^^^^^^^^^^^^^^
associated items `new` and `build` are never used: src/slr/builder.rs#L23
warning: associated items `new` and `build` are never used --> src/slr/builder.rs:23:12 | 22 | impl<'grammar> SLRTableBuilder<'grammar> { | ---------------------------------------- associated items in this implementation 23 | pub fn new( | ^^^ ... 41 | pub fn build(self) { | ^^^^^
struct `SLRTableBuilder` is never constructed: src/slr/builder.rs#L15
warning: struct `SLRTableBuilder` is never constructed --> src/slr/builder.rs:15:12 | 15 | pub struct SLRTableBuilder<'grammar> { | ^^^^^^^^^^^^^^^
struct `SLRTable` is never constructed: src/slr/builder.rs#L9
warning: struct `SLRTable` is never constructed --> src/slr/builder.rs:9:12 | 9 | pub struct SLRTable<'grammar> { | ^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
stable / clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/