Skip to content

Commit

Permalink
Merge pull request #457 from ltratt/incomplete_action_start
Browse files Browse the repository at this point in the history
Warn the user where an incomplete action started, not finished.
  • Loading branch information
ratmice authored May 27, 2024
2 parents f2c861b + 3fed871 commit d00beec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfgrammar/src/lib/yacc/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ impl YaccParser {
j += ch.len_utf8();
}
if c > 0 {
Err(self.mk_error(YaccGrammarErrorKind::IncompleteAction, j))
Err(self.mk_error(YaccGrammarErrorKind::IncompleteAction, i))
} else {
debug_assert!(self.lookahead_is("}", j).is_some());
let s = self.src[i + '{'.len_utf8()..j].trim().to_string();
Expand Down

0 comments on commit d00beec

Please sign in to comment.