@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
package/src/RuleTemplater.js
CHANGED
|
@@ -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].
|
|
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].
|
|
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
|