Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting for The Icon Programming Language #3229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

swaldo
Copy link

@swaldo swaldo commented Apr 4, 2024

Added file, runtime/syntax/icon.yaml, to provide syntax highlighting for The Icon Programming Language.

closes #3225

Comment on lines 11 to 15
- symbol.operator: "([.:;,+*|=!\\%@\\^\\?]|<|>|/|-|&)"
- symbol.brackets: "[(){}]|\\[|\\]"
- constant.number: "(\\b([1-9][0-9]*)\\b)"
- constant.number: "(\\b([1-9][0-9]?(r|R)[0-9a-zA-Z]+)\\b)"
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)\\b)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the parens are unnecessary

Suggested change
- symbol.operator: "([.:;,+*|=!\\%@\\^\\?]|<|>|/|-|&)"
- symbol.brackets: "[(){}]|\\[|\\]"
- constant.number: "(\\b([1-9][0-9]*)\\b)"
- constant.number: "(\\b([1-9][0-9]?(r|R)[0-9a-zA-Z]+)\\b)"
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)\\b)"
- symbol.operator: "[.:;,+*|=!\\%@\\^\\?]|<|>|/|-|&"
- symbol.brackets: "[(){}\\[\\]]"
- constant.number: "\\b[1-9][0-9]*\\b"
- constant.number: "\\b[1-9][0-9]?(r|R)[0-9a-zA-Z]+\\b"
- constant.number: "\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)\\b"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unnecessary parens

rules:
- constant.specialChar: "\\\\[bdeflnrtv'\\\"\\\\]"
- constant.specialChar: "\\\\[0-7]{3}"
- constant.specialChar: "\\\\x[0-9a-fA_F]{2}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is a typo

Suggested change
- constant.specialChar: "\\\\x[0-9a-fA_F]{2}"
- constant.specialChar: "\\\\x[0-9a-fA-F]{2}"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and corrected the typo.

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.

Syntax highlighting for the Icon Programming Language
2 participants