Skip to content

Improve error when using wrong YaccOriginalActionKind #618

@ratmice

Description

@ratmice

If one uses the wrong action kind e.g. %grmtools{yacckind: Original(UserAction)} instead of %grmtools{yacckind: Original(NoAction)}, the error message could be improved.
Currently this just panics at an unwrap when it tries to get the action type.

thread 'main' (4061320) panicked at ./lrpar/src/lib/ctbuilder.rs:1448:85:
  called `Option::unwrap()` on a `None` value
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Normally I would just file a PR for this, but I'm running out of time today & didn't want to forget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions