@halleyassist/rule-templater 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halleyassist/rule-templater",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "The grammar for HalleyAssist rules",
5
5
  "main": "src/RuleTemplater.production.js",
6
6
  "browser": "./dist/rule-templater.browser.js",
@@ -47,7 +47,8 @@ for(const rule of TemplateGrammar){
47
47
  // Add template_value as an alternative to value_atom so templates can be parsed
48
48
  const valueAtomIdx = extendedGrammar.findIndex(r => r.name === 'value_atom');
49
49
  if (valueAtomIdx !== -1) {
50
- extendedGrammar[valueAtomIdx].bnf.push(['template_value']);
50
+ extendedGrammar[valueAtomIdx] = Object.assign({}, extendedGrammar[valueAtomIdx]);
51
+ extendedGrammar[valueAtomIdx].bnf = extendedGrammar[valueAtomIdx].bnf.concat([['template_value']]);
51
52
  }
52
53
 
53
54
  // Export the parser rules for potential external use
@@ -47,7 +47,8 @@ for(const rule of TemplateGrammar){
47
47
  // Add template_value as an alternative to value_atom so templates can be parsed
48
48
  const valueAtomIdx = extendedGrammar.findIndex(r => r.name === 'value_atom');
49
49
  if (valueAtomIdx !== -1) {
50
- extendedGrammar[valueAtomIdx].bnf.push(['template_value']);
50
+ extendedGrammar[valueAtomIdx] = Object.assign({}, extendedGrammar[valueAtomIdx]);
51
+ extendedGrammar[valueAtomIdx].bnf = extendedGrammar[valueAtomIdx].bnf.concat([['template_value']]);
51
52
  }
52
53
 
53
54
  // Export the parser rules for potential external use