⬆️ 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,9 +16,14 @@
"value": "<!" "value": "<!"
}, },
{ {
"type": "ALIAS",
"content": {
"type": "PATTERN", "type": "PATTERN",
"value": "[Dd][Oo][Cc][Tt][Yy][Pp][Ee]" "value": "[Dd][Oo][Cc][Tt][Yy][Pp][Ee]"
}, },
"named": false,
"value": "doctype"
},
{ {
"type": "PATTERN", "type": "PATTERN",
"value": "[^>]+" "value": "[^>]+"

950
src/parser.c vendored

File diff suppressed because it is too large Load Diff