Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Lex Type, Identifiers in additional contexts #125

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion grammars/rust.cson
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
'type': {
'comment': 'A type'
'name': 'entity.name.type.rust'
'match': '\\b([A-Z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b'
}
'identifier': {
'comment': 'Any identifier not otherwise specified'
'name': 'variable.other.rust'
'match': '\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b'
}
'type_params': {
Expand All @@ -164,7 +169,7 @@
{ 'include': '#std_types' }
{ 'include': '#std_traits' }
{ 'include': '#type_params' }
# { 'include': '#type' }
{ 'include': '#type' }
]
}
}
Expand Down Expand Up @@ -215,6 +220,7 @@
{ 'include': '#block_comment' }
{ 'include': '#line_doc_comment' }
{ 'include': '#line_comment' }
{ 'include': '#type' }
]
}
# Strings
Expand Down Expand Up @@ -408,6 +414,8 @@
'match': '\bfn\b'
'name': 'keyword.other.fn.rust'
}
{ 'include': '#type' }
{ 'include': '#identifier' }
]
}
# Type declaration
Expand Down Expand Up @@ -454,4 +462,6 @@
{ 'include': '#type_params' }
]
}
{ 'include': '#type' }
{ 'include': '#identifier' }
]