From 6ad899d95a5b25d2c948db29ce3f1e048cc5aab2 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 6 Mar 2023 23:10:31 -0500 Subject: [PATCH] chore: fix license in grammar.js, update grammar.json to incl. PREC --- grammar.js | 2 +- src/grammar.json | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/grammar.js b/grammar.js index 6dbe6c9..6198b99 100644 --- a/grammar.js +++ b/grammar.js @@ -1,7 +1,7 @@ /** * @file Squirrel grammar for tree-sitter * @author Amaan Qureshi - * @license Apache-2.0 + * @license MIT * @see {@link http://squirrel-lang.org|official website} * @see {@link https://github.com/albertodemichelis/squirrel|official repository} * @see {@link http://squirrel-lang.org/squirreldoc/reference/index.html|official spec} diff --git a/src/grammar.json b/src/grammar.json index afc8c48..22da0c2 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -3734,6 +3734,26 @@ "supertypes": [ "expression", "primary_expression" - ] + ], + "PREC": { + "PAREN": -1, + "ASSIGN": 1, + "TERNARY": 2, + "LOGICAL_OR": 3, + "LOGICAL_AND": 4, + "IN": 4, + "INCLUSIVE_OR": 5, + "EXCLUSIVE_OR": 6, + "BITWISE_AND": 7, + "EQUALITY": 8, + "COMPARISON": 9, + "INSTANCEOF": 9, + "SHIFT": 10, + "ADDITIVE": 11, + "MULTIPLICATIVE": 12, + "UNARY": 13, + "CALL": 14, + "MEMBER": 15 + } }