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
Motivation
This ties into #2849. There are a few token types that are missing right now and languages usually approximate. I.e. TOML has a date token type and all tokens have a number alias for coloring.
Description
A few new token types, I would like to suggest:
time (or date or date-time): A type for dates, times, and other time instances.
We have a few languages that contain literals for dates and times. Right now, most of them use the number type.
character (or char): A type for character literals.
Some languages support literals for string and characters (e.g. C/C++, C#, Java, Rust, Scheme). Themes should be able to give these literals a different color.
ip-address (or ip-addr or ip): A type for IPv4 and IPv6 addresses.
Some languages support IP address literals.
attr-assign: A token used to assign an attribute value to an attribute name.
Some people what to highlight the assignment operator of attributes differently (example).
doc: An alias for different types to indicate that a string or comment is used for documentation (e.g. JavaDoc comments or Python docstrings). E.g. <span class="token comment doc">/** foo */</span>.
The text was updated successfully, but these errors were encountered:
I would assume you tag these as number now (as we do)... so if you moved forward with adding this would an IP address become exclusively tagged as ip-address (breaking existing themes) or would it now be a number ip-address or number.ip-address?
I guess the same question applies to char and string... I assume right now all char literals get tagged as strings... is a "char" ALSO a "string" or do themes break at the transition point?
Motivation
This ties into #2849. There are a few token types that are missing right now and languages usually approximate. I.e. TOML has a
date
token type and all tokens have anumber
alias for coloring.Description
A few new token types, I would like to suggest:
time
(ordate
ordate-time
): A type for dates, times, and other time instances.We have a few languages that contain literals for dates and times. Right now, most of them use the
number
type.character
(orchar
): A type for character literals.Some languages support literals for string and characters (e.g. C/C++, C#, Java, Rust, Scheme). Themes should be able to give these literals a different color.
ip-address
(orip-addr
orip
): A type for IPv4 and IPv6 addresses.Some languages support IP address literals.
attr-assign
: A token used to assign an attribute value to an attribute name.Some people what to highlight the assignment operator of attributes differently (example).
doc
: An alias for different types to indicate that a string or comment is used for documentation (e.g. JavaDoc comments or Python docstrings). E.g.<span class="token comment doc">/** foo */</span>
.The text was updated successfully, but these errors were encountered: