Skip to content

Allow returning errors from lexer #157

Allow returning errors from lexer

Allow returning errors from lexer #157

Triggered via push September 25, 2023 13:24
Status Success
Total duration 1m 43s
Billable time 7m
Artifacts

ci.yml

on: push
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
this returns a `Result<_, ()>`: pango-parser/src/parser/slr.rs#L44
warning: this returns a `Result<_, ()>` --> pango-parser/src/parser/slr.rs:44:5 | 44 | pub fn parse(&self, mut input: Lexer<T>) -> Result<Cst<V, T>, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
method `first` is never used: pango-parser/src/grammar.rs#L101
warning: method `first` is never used --> pango-parser/src/grammar.rs:101:8 | 96 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 101 | fn first(&self, variable: V) -> HashSet<&Symbol<V, T>> { | ^^^^^
method `iter_terminals` is never used: pango-parser/src/grammar.rs#L50
warning: method `iter_terminals` is never used --> pango-parser/src/grammar.rs:50:19 | 46 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 50 | pub(crate) fn iter_terminals(&self) -> impl Iterator<Item = &T> { | ^^^^^^^^^^^^^^
method `iter_variables` is never used: pango-parser/src/grammar.rs#L41
warning: method `iter_variables` is never used --> pango-parser/src/grammar.rs:41:19 | 33 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 41 | pub(crate) fn iter_variables(&self) -> impl Iterator<Item = V> + '_ { | ^^^^^^^^^^^^^^
fields `symbol` and `children` are never read: pango-parser/src/cst.rs#L12
warning: fields `symbol` and `children` are never read --> pango-parser/src/cst.rs:12:16 | 11 | pub(crate) struct Node<V, T> { | ---- fields in this struct 12 | pub(crate) symbol: Symbol<V, T>, | ^^^^^^ 13 | pub(crate) children: Vec<Node<V, T>>, | ^^^^^^^^ | = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
field `root` is never read: pango-parser/src/cst.rs#L6
warning: field `root` is never read --> pango-parser/src/cst.rs:6:16 | 5 | pub struct Cst<V, T> { | --- field in this struct 6 | pub(crate) root: Node<V, T>, | ^^^^ | = note: `Cst` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
method `get_cursor_terminal` is never used: pango-parser/src/cfsm/item.rs#L53
warning: method `get_cursor_terminal` is never used --> pango-parser/src/cfsm/item.rs:53:19 | 28 | impl<V, T> ItemBody<V, T> { | ------------------------- method in this implementation ... 53 | pub(crate) fn get_cursor_terminal(&self) -> Option<&T> { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
method `append` is never used: pango-lexer/src/regex/parser/error.rs#L33
warning: method `append` is never used --> pango-lexer/src/regex/parser/error.rs:33:19 | 32 | impl<'a> ParseErrors<'a> { | ------------------------ method in this implementation 33 | pub(super) fn append(&mut self, mut other: Self) { | ^^^^^^
methods `with_transition` and `get_state` are never used: pango-lexer/src/fsm/nfa/model.rs#L219
warning: methods `with_transition` and `get_state` are never used --> pango-lexer/src/fsm/nfa/model.rs:219:19 | 160 | impl NfaBuilder { | --------------- methods in this implementation ... 219 | pub(super) fn with_transition(mut self, start: StateId, end: StateId, input: Input) -> Self { | ^^^^^^^^^^^^^^^ ... 268 | pub(super) fn get_state(&self, state_id: StateId) -> &State { | ^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
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/