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
2 changes: 1 addition & 1 deletion lrpar/cttests/src/calc_actiontype.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test basic user actions using the calculator grammar (Original yacckind)
yacckind: Original(YaccOriginalActionKind::UserAction)
recoverer: RecoveryKind::None
recoverer: RecoveryKind::CPCTPlus
grammar: |
%start Expr
%actiontype Result<u64, ()>
Expand Down
3 changes: 2 additions & 1 deletion lrpar/cttests/src/cgen_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ pub(crate) fn run_test_path<P: AsRef<Path>>(path: P) -> Result<(), Box<dyn std::
Some(s) => panic!("YaccKind '{}' not supported", s),
None => None,
};
let recoverer = match docs[0]["revoverer"].as_str() {
let recoverer = match docs[0]["recoverer"].as_str() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should learn our lesson here and add a Some(_) => panic!("Unknown recovery kind")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed in 72afa11

I didn't see anything else that wasn't checking for unrecognized Some(_) values.

Some("RecoveryKind::CPCTPlus") => Some(RecoveryKind::CPCTPlus),
Some("RecoveryKind::None") => Some(RecoveryKind::None),
Some(kind) => panic!("Unknown RecoveryKind '{kind}'"),
_ => None,
};
let (negative_lex_flags, positive_lex_flags) = &docs[0]["lex_flags"]
Expand Down