Update tree-sitter-compiler, use new grammar API

pull/70/head
Max Brunsfeld 2015-09-11 10:12:50 +07:00
parent cabc2bbfe1
commit d6d926183c
2 changed files with 339 additions and 343 deletions

@ -1,16 +1,13 @@
module.exports =
({choice, err, repeat, seq, sym, token, optional, prec}) ->
commaSep1 = (rule) ->
commaSep1 = (rule) ->
seq(rule, repeat(seq(",", rule)))
commaSep = (rule) ->
commaSep = (rule) ->
optional(commaSep1(rule))
terminator = ->
terminator = ->
choice(";", sym("_line_break"))
PREC =
PREC =
COMMA: -1,
ASSIGN: 0,
BLOCK: 1,
@ -28,7 +25,7 @@ module.exports =
CALL: 12,
MEMBER: 13
{
module.exports = grammar
name: 'javascript'
ubiquitous: -> [
@ -344,4 +341,3 @@ module.exports =
choice(@identifier, @string),
":",
@_expression)
}

@ -14,7 +14,7 @@
"nan": "1.7.x"
},
"devDependencies": {
"tree-sitter-compiler": ">= 0.0.20"
"tree-sitter-compiler": ">= 0.0.21"
},
"scripts": {
"prepublish": "tree-sitter compile",