Removing Terminal type and replacing with Literal, Escape, and AnyChar
This is to eventually simplify the combining of Literals together (and to actually make it work correctly, since terminals should not have been merged)
This commit is contained in:
1 parent
41c11ad5d4
commit
f5d1e734f1
7 files changed
+30
-12
No files matched your search
@@ -70,10 +70,11 @@ export default _.extend({}, Base, {
|
||||
var last = result.pop();
|
||||
|
||||
if (last) {
|
||||
if (node.elements[0].type === 'terminal' && node.elements[1].textValue === '' && last.elements[0].type === 'terminal' && last.elements[1].textValue === '') {
|
||||
if (node.elements[0].type === 'literal' && node.elements[1].textValue === '' && last.elements[0].type === 'literal' && last.elements[1].textValue === '') {
|
||||
last = _.clone(last, true);
|
||||
last.textValue += node.textValue;
|
||||
last.elements[0].textValue += node.elements[0].textValue;
|
||||
last.elements[0].literal.textValue += node.elements[0].literal.textValue;
|
||||
last.elements[1] = node.elements[1];
|
||||
node = last;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user