zig icon indicating copy to clipboard operation
zig copied to clipboard

Accept more illegal characters in the lexer, report them in AstGen

Open tau-dev opened this issue 1 year ago • 6 comments

Closes #12449 and #13809.

Generate .invalid tokens only in severe cases (illegal line break or null). This allows us to continue parsing a lot more often, allowing for more and better error messages.

The numeric literals mentioned in #12449 already had this treatment, this commit applies it to char literals and identifiers.

In error messages, count Unicode codepoints to line up the source highlight. Render tabs as four spaces, Zig's default indentation.

tau-dev avatar Jul 12 '24 16:07 tau-dev

理论上是不支持的,v2ray系只支持 obfs-host

2dust avatar Jul 24 '24 12:07 2dust