Support input storage class
This commit is contained in:
+3
-1
@@ -2,5 +2,7 @@ const CPP = require("tree-sitter-cpp/grammar")
|
||||
|
||||
module.exports = grammar(CPP, {
|
||||
name: "mql5",
|
||||
rules: {},
|
||||
rules: {
|
||||
storage_class_specifier: ($, original) => choice(original, "input"),
|
||||
},
|
||||
})
|
||||
|
||||
Vendored
+24
-15
@@ -3388,24 +3388,33 @@
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "extern"
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "extern"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "static"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "register"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "inline"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "thread_local"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "static"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "register"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "inline"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "thread_local"
|
||||
"value": "input"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Vendored
+4
@@ -6587,6 +6587,10 @@
|
||||
"type": "inline",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "input",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "literal_suffix",
|
||||
"named": true
|
||||
|
||||
Vendored
+305788
-304103
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
==========================================
|
||||
input storage class
|
||||
==========================================
|
||||
|
||||
int a;
|
||||
input int b;
|
||||
input double c;
|
||||
|
||||
---
|
||||
|
||||
(translation_unit
|
||||
(declaration (primitive_type) (identifier))
|
||||
(declaration (storage_class_specifier) (primitive_type) (identifier))
|
||||
(declaration (storage_class_specifier) (primitive_type) (identifier)))
|
||||
Reference in New Issue
Block a user