Merge commit '760985e2148a8282af86a554bf2e7d27189c2624'

ida_star
Wilfred Hughes 2021-09-11 20:32:18 +07:00
commit 8ae7cf0d59
6 changed files with 149 additions and 118 deletions

@ -190,10 +190,12 @@ module.exports = grammar({
'$', '(', repeat($._tokens), ')', optional(/[^+*?]+/), choice('+', '*', '?')
),
non_special_punctuation: $ => /[/_\-=->,;:::!=?.@*&#%^+<>|~]+/,
_non_special_token: $ => choice(
$._literal, $.identifier, $.metavariable, $.mutable_specifier, $.self, $.super, $.crate,
alias(choice(...primitive_types), $.primitive_type),
/[/_\-=->,;:::!=?.@*&#%^+<>|~]+/,
$.non_special_punctuation,
'\'',
'as', 'async', 'await', 'break', 'const', 'continue', 'default', 'enum', 'fn', 'for', 'if', 'impl',
'let', 'loop', 'match', 'mod', 'pub', 'return', 'static', 'struct', 'trait', 'type',

@ -7,6 +7,10 @@
"parser",
"rust"
],
"repository": {
"type": "git",
"url": "https://github.com/tree-sitter/tree-sitter-rust.git"
},
"author": "Maxim Sokolov <maxim0xff@gmail.com> (https://github.com/MaximSokolov)",
"license": "MIT",
"dependencies": {
@ -16,6 +20,7 @@
"tree-sitter-cli": "^0.19.1"
},
"scripts": {
"generate": "tree-sitter generate",
"test": "tree-sitter test && script/parse-examples",
"test-windows": "tree-sitter test"
},

@ -653,6 +653,10 @@
}
]
},
"non_special_punctuation": {
"type": "PATTERN",
"value": "[/_\\-=->,;:::!=?.@*&#%^+<>|~]+"
},
"_non_special_token": {
"type": "CHOICE",
"members": [
@ -763,8 +767,8 @@
"value": "primitive_type"
},
{
"type": "PATTERN",
"value": "[/_\\-=->,;:::!=?.@*&#%^+<>|~]+"
"type": "SYMBOL",
"name": "non_special_punctuation"
},
{
"type": "STRING",

@ -3504,6 +3504,10 @@
"type": "mutable_specifier",
"named": true
},
{
"type": "non_special_punctuation",
"named": true
},
{
"type": "primitive_type",
"named": true
@ -3555,6 +3559,10 @@
"type": "mutable_specifier",
"named": true
},
{
"type": "non_special_punctuation",
"named": true
},
{
"type": "primitive_type",
"named": true
@ -3610,6 +3618,10 @@
"type": "mutable_specifier",
"named": true
},
{
"type": "non_special_punctuation",
"named": true
},
{
"type": "primitive_type",
"named": true
@ -3661,6 +3673,10 @@
"type": "mutable_specifier",
"named": true
},
{
"type": "non_special_punctuation",
"named": true
},
{
"type": "primitive_type",
"named": true
@ -4868,6 +4884,10 @@
"type": "mutable_specifier",
"named": true
},
{
"type": "non_special_punctuation",
"named": true
},
{
"type": "pat",
"named": false

File diff suppressed because it is too large Load Diff

@ -102,8 +102,8 @@ struct TSLanguage {
const uint16_t *small_parse_table;
const uint32_t *small_parse_table_map;
const TSParseActionEntry *parse_actions;
const char **symbol_names;
const char **field_names;
const char * const *symbol_names;
const char * const *field_names;
const TSFieldMapSlice *field_map_slices;
const TSFieldMapEntry *field_map_entries;
const TSSymbolMetadata *symbol_metadata;