mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
add support for @,_,* tokens
This commit is contained in:
parent
5a0a7289ba
commit
1e26769313
2 changed files with 22 additions and 1 deletions
|
@ -45,6 +45,7 @@ pub fn highlight(code: &str) -> Vec<String> {
|
|||
| Token::ColonEquals
|
||||
| Token::Colon
|
||||
| Token::And
|
||||
| Token::AtSign
|
||||
| Token::QuestionMark => {
|
||||
buf = push_html_span(buf, current_text, "kw");
|
||||
}
|
||||
|
@ -63,6 +64,7 @@ pub fn highlight(code: &str) -> Vec<String> {
|
|||
| Token::LessThanEquals
|
||||
| Token::DoubleEquals
|
||||
| Token::DoubleBar
|
||||
| Token::Multiply
|
||||
| Token::Plus
|
||||
| Token::DoubleAnd => {
|
||||
buf = push_html_span(buf, current_text, "op");
|
||||
|
@ -81,7 +83,8 @@ pub fn highlight(code: &str) -> Vec<String> {
|
|||
buf = push_html_span(buf, current_text, "upperident");
|
||||
}
|
||||
// Variables modules and field names
|
||||
Token::LowerIdent => {
|
||||
Token::LowerIdent
|
||||
| Token::Underscore => {
|
||||
buf = push_html_span(buf, current_text, "lowerident");
|
||||
}
|
||||
// Anyting else that wasn't tokenised
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue