File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ errors:
153
153
- INVALID_NUMBER_UNDERSCORE_INNER
154
154
- INVALID_NUMBER_UNDERSCORE_TRAILING
155
155
- INVALID_PERCENT
156
+ - INVALID_PERCENT_EOF
156
157
- INVALID_PRINTABLE_CHARACTER
157
158
- INVALID_RETRY_AFTER_ELSE
158
159
- INVALID_RETRY_AFTER_ENSURE
Original file line number Diff line number Diff line change @@ -11356,7 +11356,7 @@ parser_lex(pm_parser_t *parser) {
11356
11356
// operator because we don't want to move into the string
11357
11357
// lex mode unnecessarily.
11358
11358
if ((lex_state_beg_p(parser) || lex_state_arg_p(parser)) && (parser->current.end >= parser->end)) {
11359
- pm_parser_err_current(parser, PM_ERR_INVALID_PERCENT );
11359
+ pm_parser_err_current(parser, PM_ERR_INVALID_PERCENT_EOF );
11360
11360
LEX(PM_TOKEN_PERCENT);
11361
11361
}
11362
11362
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ static const pm_diagnostic_data_t diagnostic_messages[PM_DIAGNOSTIC_ID_MAX] = {
236
236
[PM_ERR_INVALID_MULTIBYTE_ESCAPE] = { "invalid multibyte escape: /%.*s/", PM_ERROR_LEVEL_SYNTAX },
237
237
[PM_ERR_INVALID_PRINTABLE_CHARACTER] = { "invalid character `%c`", PM_ERROR_LEVEL_SYNTAX },
238
238
[PM_ERR_INVALID_PERCENT] = { "unknown type of %string", PM_ERROR_LEVEL_SYNTAX },
239
+ [PM_ERR_INVALID_PERCENT_EOF] = { "unterminated quoted string meets end of file", PM_ERROR_LEVEL_SYNTAX },
239
240
[PM_ERR_INVALID_RETRY_AFTER_ELSE] = { "Invalid retry after else", PM_ERROR_LEVEL_SYNTAX },
240
241
[PM_ERR_INVALID_RETRY_AFTER_ENSURE] = { "Invalid retry after ensure", PM_ERROR_LEVEL_SYNTAX },
241
242
[PM_ERR_INVALID_RETRY_WITHOUT_RESCUE] = { "Invalid retry without rescue", PM_ERROR_LEVEL_SYNTAX },
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ def test_missing_terminator_in_parentheses
208
208
209
209
def test_unterminated_argument_expression
210
210
assert_errors expression ( 'a %' ) , 'a %' , [
211
- [ "unknown type of %string " , 2 ..3 ] ,
211
+ [ "unterminated quoted string meets end of file " , 2 ..3 ] ,
212
212
[ "unexpected end-of-input; expected an expression after the operator" , 3 ..3 ] ,
213
213
[ "unexpected end-of-input, assuming it is closing the parent top level context" , 3 ..3 ]
214
214
]
You can’t perform that action at this time.
0 commit comments