Skip to content

Conversation

@smaillet
Copy link
Member

@smaillet smaillet commented May 6, 2025

Updated highlighting for ANTLR to support references to lexer/grammar rules as a function invocation.

  • It's difficult to map the concepts of ANTLR into the scopes defined by Highlight.JS. Especially when the theme used doesn't provide a lot of support for the non-code elements.
  • This change tags the references to the rules as function invocations (technically, that's how they are implemented...).
  • There is a tagging difference between the declaration and the invocation. Even if the theme doesn't show it.
    • The theme that comes with DOCFX "modern" template. Is so limited that the declarations are tagged as a 'type' just so they get something in the way of a visual distinction...
    • It is plausible to override/replace the theming that comes with the modern template via "main.css" in the custom template... Which could correct a number of issues with readability in dark theme...
      • Something to consider...

… rules as a function invocation.

- It's difficult to map the concepts of ANTLR into the scopes defined by Highlight.JS. Especially when the theme used doesn't provide a lot of support for the non-code elements.
- This tags the references to the rules as function invocations (technically, that's how they are implemented...).
- There is a tagging difference between the declaration and the invocation. Even if the theme doesn't show it.
    - The theme that comes with DOCFX "modern" template. Is so limited that the declarations are tagged as a 'type' just so they get something in the way of a visual distinction...
    - It is plausible to override/replace the theming that comes with the modern template via "main.css" in the custom template... Which could correct a number of issues with readability in dark theme...
        - Something to consider...
@smaillet smaillet merged commit 882737c into UbiquityDotNET:develop May 6, 2025
2 checks passed
@smaillet smaillet deleted the AntlrHighlightUpdates branch May 6, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant