question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document all token types

See original GitHub issue

Motivation Themes depend on Prism producing tokens with specific types (or aliases). Right now, we do not guarantee or document any of those types.

Description Document all standard token types (e.g. keyword, comment, …). It should explain the general concept behind each token type and give at least one example.

The documentation should also include how languages are embedded. Example.

We should also guarantee that these concepts within languages are guaranteed to use these token types. (E.g. we guarantee that keywords always have a keyword class.) It might sound like we already do this but this is not the case right now. (E.g. we have many languages with operator keywords (e.g. NOT in SQL) that do not have a keyword class.)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:53 (39 by maintainers)

github_iconTop GitHub Comments

1reaction
RunDevelopmentcommented, Jan 9, 2022

I thought about a name again. How about “composite tokens”?

composite a distinct entity formed by the combining of two or more different things

I think the word “composite” it fits pretty well for our combination of non-standard and standard tokens.

1reaction
RunDevelopmentcommented, Dec 8, 2021

It does seem to tie a bit into #2850 as well?

You’re right, it does. These “extended standard tokens”/token combinations (let’s hope this name doesn’t stick) are pretty much what I wanted and (if implemented) would resolve #2850.

Also, capturing and listing (some of) these non-standard tokens would be useful too, so there would be some consistency/re-use of non-standard tokens across languages in a way.

Good point.

I’m happy to help with the code/docs to whatever extent I can

Thank you so much!

Besides that, I think I’m really hitting the limits of the level I can think at right now. […] I’m sorry I can’t quite contribute to the conversation! 😊

Oh, I think you contributed quite a lot to it already. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tokens - Auth0
There are two types of tokens that are related to identity: ID tokens and access tokens . ID tokens. ID tokens are JSON...
Read more >
Token types | Authentication - Google Cloud
This page discusses the types of tokens used for authentication to Google APIs, Google Cloud services, and customer-created services hosted on Google Cloud....
Read more >
Tokenization - Stanford NLP Group
A token is an instance of a sequence of characters in some particular document that are grouped together as a useful semantic unit...
Read more >
Types of tokens in XML instance documents? - lists
Leaving aside the DTD stuff, I think these are the types of tokens in XML documents: 1. The '<' character 2. The '>'...
Read more >
tokenType | Apple Developer Documentation
Classifies tokens according to their broad type: word, punctuation, or whitespace.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found