You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C# code in the standard isn't parsed - it's just colorized.
The ANTLR grammar, however, is parsed. I suspect that's for historical reasons, back when the Word converter would also gather all the grammar rules together and perform a certain amount of validation.
I'm wondering whether we could fix #394 (and simplify the code!) just by not parsing the ANTLR at all. It might be tricky to get it colorized that way, given that Colorize doesn't have any built-in support, but I suspect that "leave it as formatted in Markdown, but as if it's plain text" is actually better than trying to parse and handle it ourselves.
Will give that a try...
The text was updated successfully, but these errors were encountered:
Looks like we also use the parsed grammar to link to bookmarks. We could potentially still just use the plain text and keep parsing it to get the production names... or lose the bookmarks. Will prototype both ways.
jskeet
added a commit
to jskeet/csharpstandard
that referenced
this issue
Mar 15, 2022
(See dotnet#494)
This means we lose bookmarks, but it's really straightforward.
Note: the tests won't pass together yet as there's global state to
fix, but I'll sort that separately.
C# code in the standard isn't parsed - it's just colorized.
The ANTLR grammar, however, is parsed. I suspect that's for historical reasons, back when the Word converter would also gather all the grammar rules together and perform a certain amount of validation.
I'm wondering whether we could fix #394 (and simplify the code!) just by not parsing the ANTLR at all. It might be tricky to get it colorized that way, given that Colorize doesn't have any built-in support, but I suspect that "leave it as formatted in Markdown, but as if it's plain text" is actually better than trying to parse and handle it ourselves.
Will give that a try...
The text was updated successfully, but these errors were encountered: