⬆️ tree-sitter-cli for alias improvements

This commit is contained in:
Max Brunsfeld 2018-08-30 11:28:22 -07:00
parent 35f19b1bad
commit 50073cde62
4 changed files with 454 additions and 511 deletions

View File

@ -22,7 +22,7 @@ module.exports = grammar({
doctype: $ => seq( doctype: $ => seq(
'<!', '<!',
/[Dd][Oo][Cc][Tt][Yy][Pp][Ee]/, alias(/[Dd][Oo][Cc][Tt][Yy][Pp][Ee]/, 'doctype'),
/[^>]+/, /[^>]+/,
'>' '>'
), ),

View File

@ -13,10 +13,10 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"nan": "^2.8.0" "nan": "^2.10.0"
}, },
"devDependencies": { "devDependencies": {
"tree-sitter-cli": "^0.13.1" "tree-sitter-cli": "^0.13.7"
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",

View File

@ -16,8 +16,13 @@
"value": "<!" "value": "<!"
}, },
{ {
"type": "PATTERN", "type": "ALIAS",
"value": "[Dd][Oo][Cc][Tt][Yy][Pp][Ee]" "content": {
"type": "PATTERN",
"value": "[Dd][Oo][Cc][Tt][Yy][Pp][Ee]"
},
"named": false,
"value": "doctype"
}, },
{ {
"type": "PATTERN", "type": "PATTERN",

950
src/parser.c vendored

File diff suppressed because it is too large Load Diff