Token type guidelines
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Motivation
While the type of a token is generally constraint by the ones Prism's themes support, the authors of language definitions have to choose within this set of supported token which might not perfectly match their language.
The goal of this issue is to establish guidelines to keep the token types across languages consistent and to publish these guidelines on the Prism website.
#2073 started it all.
Description
So far, there's only one guideline by @mAAdhaTTah.
-
Don't make any token "punctuation" if it fits into another token type. In other words, "punctuation" is a token of last resort.
-
"true" and "false" or any two literal pairs which express the same concept are "boolean" tokens.
@Golmote @mAAdhaTTah I would like to collect a few guidelines and make them their own section here. This section will also contain information about what token types are available.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing token-type guidance in the comment on PR #2073 and the extending.html section of the Prism website. Review how Prism’s supported token types are currently described, then collect and agree on consistent guidelines and document the available types and rules in that section.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100