fix annotation error msg

This commit is contained in:
gluax 2022-03-04 09:28:29 -08:00
parent 029a42df0a
commit bd1d602f6d
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ impl ParserContext<'_> {
Some(ident.name) Some(ident.name)
} else { } else {
let token = p.expect_any()?; let token = p.expect_any()?;
p.emit_err(ParserError::unexpected_str(&token.token, "ident or int", &token.span)); p.emit_err(ParserError::unexpected_str(&token.token, "ident", &token.span));
None None
}) })
})?; })?;

View File

@ -2,4 +2,4 @@
namespace: Parse namespace: Parse
expectation: Fail expectation: Fail
outputs: outputs:
- "Error [EPAR0370009]: unexpected string: expected 'ident or int', got '?'\n --> test:3:6\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370009]: unexpected string: expected 'ident or int', got '?'\n --> test:3:14\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370017]: \"@context(...)\" is deprecated. Did you mean @test annotation?\n --> test:8:2\n |\n 8 | @context // recovery witness\n | ^^^^^^^" - "Error [EPAR0370009]: unexpected string: expected 'ident', got '?'\n --> test:3:6\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370009]: unexpected string: expected 'ident', got '?'\n --> test:3:14\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370017]: \"@context(...)\" is deprecated. Did you mean @test annotation?\n --> test:8:2\n |\n 8 | @context // recovery witness\n | ^^^^^^^"