Skip to content
Commit bb6732cf authored by Fangrui Song's avatar Fangrui Song
Browse files

[MC] Add parseEOL() overload and migrate some parseToken(AsmToken::EndOfStatement) to parseEOL()

For many directives, the following diagnostics

* `error: unexpected token`
* `error: unexpected token in '.abort' directive"`

are replaced with `error: expected newline`.

`unexpected token` may make the user think a different token is needed.
`expected newline` is clearer about the expected token.

For `in '...' directive`, the directive name is not useful because the next line
replicates the error line which includes the directive.
parent e5eb3e38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment