emblem-source 0.3.16 → 0.3.17
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.
- checksums.yaml +4 -4
- data/dist/emblem.js +1397 -653
- data/dist/emblem.min.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 732ecf68e12e7752395c72008a5aa9967b4bebea
|
4
|
+
data.tar.gz: a9744e476ba1f08f3317e655dbae9afcc77bd237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 131014ea631288849c06b904e314e064da915cafb25a987a6df7168da18256d73d86a212bfe24d389490178957bfed121b33fb710660addaa69008e6905f443e
|
7
|
+
data.tar.gz: 6f5344174dc787cb4f47c0141e12fad36ca29a740eed2c3fa3a51ef309cf67621f2ea935ea9134303b9ed204cf33251725d9ef1f85e08b9b870cec1e8c8f07cb
|
data/dist/emblem.js
CHANGED
@@ -103,7 +103,7 @@ this.Emblem = {};
|
|
103
103
|
|
104
104
|
Emblem = this.Emblem;
|
105
105
|
|
106
|
-
Emblem.VERSION = "0.3.
|
106
|
+
Emblem.VERSION = "0.3.17";
|
107
107
|
|
108
108
|
module.exports = Emblem;
|
109
109
|
|
@@ -295,7 +295,10 @@ Emblem.Parser = (function() {
|
|
295
295
|
},
|
296
296
|
peg$c28 = function(c) { return c; },
|
297
297
|
peg$c29 = function(m) { return [m]; },
|
298
|
-
peg$c30 =
|
298
|
+
peg$c30 = "]",
|
299
|
+
peg$c31 = "\"]\"",
|
300
|
+
peg$c32 = function(h) { return h;},
|
301
|
+
peg$c33 = function(h, nested) {
|
299
302
|
// h is [[open tag content], closing tag ContentNode]
|
300
303
|
var ret = h[0];
|
301
304
|
if(nested) { ret = ret.concat(nested); }
|
@@ -305,8 +308,11 @@ Emblem.Parser = (function() {
|
|
305
308
|
|
306
309
|
return ret;
|
307
310
|
},
|
308
|
-
peg$
|
309
|
-
|
311
|
+
peg$c34 = function(mustacheNode, nestedContentProgramNode) {
|
312
|
+
|
313
|
+
if (!nestedContentProgramNode) {
|
314
|
+
return mustacheNode;
|
315
|
+
}
|
310
316
|
|
311
317
|
var close = mustacheNode.id;
|
312
318
|
if (use11AST) {
|
@@ -316,21 +322,26 @@ Emblem.Parser = (function() {
|
|
316
322
|
right: false
|
317
323
|
};
|
318
324
|
}
|
319
|
-
|
320
325
|
var block = new AST.BlockNode(mustacheNode, nestedContentProgramNode, nestedContentProgramNode.inverse, close);
|
326
|
+
|
321
327
|
block.path = mustacheNode.id;
|
322
328
|
return block;
|
323
329
|
},
|
324
|
-
peg$
|
325
|
-
peg$
|
326
|
-
peg$
|
327
|
-
peg$
|
328
|
-
peg$
|
330
|
+
peg$c35 = ": ",
|
331
|
+
peg$c36 = "\": \"",
|
332
|
+
peg$c37 = function(statements) { return createProgramNode(statements, []); },
|
333
|
+
peg$c38 = function(block) {return block && block[2]; },
|
334
|
+
peg$c39 = function(block) {
|
335
|
+
return block;
|
336
|
+
},
|
337
|
+
peg$c40 = function(e, ret) {
|
329
338
|
var mustache = ret.mustache || ret;
|
330
339
|
mustache.escaped = e;
|
331
340
|
return ret;
|
332
341
|
},
|
333
|
-
peg$
|
342
|
+
peg$c41 = "[",
|
343
|
+
peg$c42 = "\"[\"",
|
344
|
+
peg$c43 = function(isPartial, sexpr) {
|
334
345
|
if(isPartial) {
|
335
346
|
var n = new AST.PartialNameNode(new AST.StringNode(sexpr.id.string));
|
336
347
|
return new AST.PartialNode(n, sexpr.params[0]);
|
@@ -351,91 +362,51 @@ Emblem.Parser = (function() {
|
|
351
362
|
} else if(tm === '^') {
|
352
363
|
return unshiftParam(mustacheNode, 'unless');
|
353
364
|
}
|
354
|
-
|
355
365
|
return mustacheNode;
|
356
366
|
},
|
357
|
-
peg$
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
var p = params[i];
|
365
|
-
var attrKey = p[0];
|
366
|
-
if(attrKey == 'tagName' || attrKey == 'elementId' || attrKey == 'class') {
|
367
|
-
hasAttrs = true;
|
368
|
-
attrs[attrKey] = attrs[attrKey] || [];
|
369
|
-
attrs[attrKey].push(p[1]);
|
370
|
-
} else {
|
371
|
-
actualParams.push(p);
|
372
|
-
}
|
373
|
-
}
|
374
|
-
|
375
|
-
if(hasAttrs) {
|
376
|
-
hash = hash || new AST.HashNode([]);
|
377
|
-
for(var k in attrs) {
|
378
|
-
if(!attrs.hasOwnProperty(k)) continue;
|
379
|
-
hash.pairs.push([k, new AST.StringNode(attrs[k].join(' '))]);
|
380
|
-
}
|
381
|
-
}
|
382
|
-
|
383
|
-
actualParams.unshift(path);
|
384
|
-
|
385
|
-
if (useSexprNodes) {
|
386
|
-
return new AST.SexprNode(actualParams, hash);
|
387
|
-
} else {
|
388
|
-
// Stub a sexpr-like node for backwards compatibility with pre-1.3 AST.
|
389
|
-
return {
|
390
|
-
id: actualParams[0],
|
391
|
-
params: actualParams.slice(1),
|
392
|
-
hash: hash
|
393
|
-
};
|
394
|
-
}
|
395
|
-
},
|
396
|
-
peg$c39 = function(t) { return ['tagName', t]; },
|
397
|
-
peg$c40 = function(i) { return ['elementId', i]; },
|
398
|
-
peg$c41 = function(c) { return ['class', c]; },
|
399
|
-
peg$c42 = function(a) {
|
367
|
+
peg$c44 = " [",
|
368
|
+
peg$c45 = "\" [\"",
|
369
|
+
peg$c46 = function(path, params, hash) { return parseSexpr(path, params, hash) },
|
370
|
+
peg$c47 = function(t) { return ['tagName', t]; },
|
371
|
+
peg$c48 = function(i) { return ['elementId', i]; },
|
372
|
+
peg$c49 = function(c) { return ['class', c]; },
|
373
|
+
peg$c50 = function(a) {
|
400
374
|
return a;
|
401
375
|
},
|
402
|
-
peg$
|
403
|
-
peg$
|
404
|
-
peg$
|
405
|
-
peg$
|
406
|
-
peg$
|
407
|
-
peg$
|
408
|
-
peg$
|
409
|
-
peg$
|
410
|
-
peg$
|
411
|
-
peg$
|
412
|
-
peg$
|
413
|
-
peg$
|
414
|
-
peg$
|
415
|
-
peg$
|
416
|
-
peg$
|
417
|
-
peg$
|
418
|
-
peg$
|
419
|
-
peg$
|
420
|
-
peg$
|
421
|
-
peg$
|
422
|
-
peg$
|
423
|
-
peg$
|
424
|
-
peg$
|
425
|
-
peg$
|
426
|
-
peg$c67 = function(s) { s.isHelper = true; return s; },
|
427
|
-
peg$c68 = function(s, p) { return { part: p, separator: s }; },
|
428
|
-
peg$c69 = function(first, tail) {
|
376
|
+
peg$c51 = function(id, classes) { return [id, classes]; },
|
377
|
+
peg$c52 = function(classes) { return [null, classes]; },
|
378
|
+
peg$c53 = function(p) { return p; },
|
379
|
+
peg$c54 = function(a) { return a; },
|
380
|
+
peg$c55 = function(h) { return new AST.HashNode(h); },
|
381
|
+
peg$c56 = "PathIdent",
|
382
|
+
peg$c57 = "..",
|
383
|
+
peg$c58 = "\"..\"",
|
384
|
+
peg$c59 = ".",
|
385
|
+
peg$c60 = "\".\"",
|
386
|
+
peg$c61 = /^[a-zA-Z0-9_$\-!?\^@]/,
|
387
|
+
peg$c62 = "[a-zA-Z0-9_$\\-!?\\^@]",
|
388
|
+
peg$c63 = function(s) { return s; },
|
389
|
+
peg$c64 = /^[^\]]/,
|
390
|
+
peg$c65 = "[^\\]]",
|
391
|
+
peg$c66 = function(segmentLiteral) { return segmentLiteral; },
|
392
|
+
peg$c67 = "Key",
|
393
|
+
peg$c68 = ":",
|
394
|
+
peg$c69 = "\":\"",
|
395
|
+
peg$c70 = function(h) { return [h[0], h[2]]; },
|
396
|
+
peg$c71 = function(h) { return [h[0], h[2]];},
|
397
|
+
peg$c72 = function(s) { s.isHelper = true; return s; },
|
398
|
+
peg$c73 = function(s, p) { return { part: p, separator: s }; },
|
399
|
+
peg$c74 = function(first, tail) {
|
429
400
|
var ret = [{ part: first }];
|
430
401
|
for(var i = 0; i < tail.length; ++i) {
|
431
402
|
ret.push(tail[i]);
|
432
403
|
}
|
433
404
|
return ret;
|
434
405
|
},
|
435
|
-
peg$
|
436
|
-
peg$
|
437
|
-
peg$
|
438
|
-
peg$
|
406
|
+
peg$c75 = "PathSeparator",
|
407
|
+
peg$c76 = /^[\/.]/,
|
408
|
+
peg$c77 = "[\\/.]",
|
409
|
+
peg$c78 = function(v) {
|
439
410
|
var last = v[v.length - 1];
|
440
411
|
|
441
412
|
// Support for data keywords that are prefixed with @ in the each
|
@@ -459,32 +430,32 @@ Emblem.Parser = (function() {
|
|
459
430
|
|
460
431
|
return idNode;
|
461
432
|
},
|
462
|
-
peg$
|
463
|
-
peg$
|
464
|
-
peg$
|
465
|
-
peg$
|
466
|
-
peg$
|
467
|
-
peg$
|
468
|
-
peg$
|
469
|
-
peg$
|
470
|
-
peg$
|
471
|
-
peg$
|
472
|
-
peg$
|
473
|
-
peg$
|
474
|
-
peg$
|
475
|
-
peg$
|
476
|
-
peg$
|
477
|
-
peg$
|
478
|
-
peg$
|
479
|
-
peg$
|
480
|
-
peg$
|
481
|
-
peg$
|
482
|
-
peg$
|
483
|
-
peg$
|
484
|
-
peg$
|
485
|
-
peg$
|
486
|
-
peg$
|
487
|
-
peg$
|
433
|
+
peg$c79 = function(v) { return new AST.StringNode(v); },
|
434
|
+
peg$c80 = function(v) { return new AST.IntegerNode(v); },
|
435
|
+
peg$c81 = function(v) { return new AST.BooleanNode(v); },
|
436
|
+
peg$c82 = "Boolean",
|
437
|
+
peg$c83 = "true",
|
438
|
+
peg$c84 = "\"true\"",
|
439
|
+
peg$c85 = "false",
|
440
|
+
peg$c86 = "\"false\"",
|
441
|
+
peg$c87 = "Integer",
|
442
|
+
peg$c88 = "-",
|
443
|
+
peg$c89 = "\"-\"",
|
444
|
+
peg$c90 = /^[0-9]/,
|
445
|
+
peg$c91 = "[0-9]",
|
446
|
+
peg$c92 = function(s) { return parseInt(s); },
|
447
|
+
peg$c93 = "\"",
|
448
|
+
peg$c94 = "\"\\\"\"",
|
449
|
+
peg$c95 = "'",
|
450
|
+
peg$c96 = "\"'\"",
|
451
|
+
peg$c97 = function(p) { return p[1]; },
|
452
|
+
peg$c98 = /^[^"}]/,
|
453
|
+
peg$c99 = "[^\"}]",
|
454
|
+
peg$c100 = /^[^'}]/,
|
455
|
+
peg$c101 = "[^'}]",
|
456
|
+
peg$c102 = /^[A-Za-z]/,
|
457
|
+
peg$c103 = "[A-Za-z]",
|
458
|
+
peg$c104 = function(ind, nodes, w) {
|
488
459
|
nodes.unshift(new AST.ContentNode(ind));
|
489
460
|
|
490
461
|
for(var i = 0; i < w.length; ++i) {
|
@@ -494,12 +465,12 @@ Emblem.Parser = (function() {
|
|
494
465
|
}
|
495
466
|
return nodes;
|
496
467
|
},
|
497
|
-
peg$
|
498
|
-
peg$
|
499
|
-
peg$
|
500
|
-
peg$
|
501
|
-
peg$
|
502
|
-
peg$
|
468
|
+
peg$c105 = /^[|`']/,
|
469
|
+
peg$c106 = "[|`']",
|
470
|
+
peg$c107 = "<",
|
471
|
+
peg$c108 = "\"<\"",
|
472
|
+
peg$c109 = function() { return '<'; },
|
473
|
+
peg$c110 = function(s, nodes, indentedNodes) {
|
503
474
|
if(nodes.length || !indentedNodes) {
|
504
475
|
nodes.push("\n");
|
505
476
|
}
|
@@ -529,154 +500,63 @@ Emblem.Parser = (function() {
|
|
529
500
|
if(s === "'") {
|
530
501
|
ret.push(new AST.ContentNode(" "));
|
531
502
|
}
|
532
|
-
|
533
503
|
return ret;
|
534
504
|
},
|
535
|
-
peg$
|
505
|
+
peg$c111 = function(first, tail) {
|
536
506
|
return textNodesResult(first, tail);
|
537
507
|
},
|
538
|
-
peg$
|
539
|
-
peg$
|
540
|
-
peg$
|
541
|
-
peg$
|
542
|
-
peg$
|
543
|
-
peg$
|
508
|
+
peg$c112 = function(first, tail) { return textNodesResult(first, tail); },
|
509
|
+
peg$c113 = "{",
|
510
|
+
peg$c114 = "\"{\"",
|
511
|
+
peg$c115 = /^[^}]/,
|
512
|
+
peg$c116 = "[^}]",
|
513
|
+
peg$c117 = function(text) {
|
544
514
|
// Force interpretation as mustache.
|
545
515
|
// TODO: change to just parse with a specific rule?
|
546
516
|
text = "=" + text;
|
547
517
|
return Emblem.parse(text).statements[0];
|
548
518
|
},
|
549
|
-
peg$
|
550
|
-
peg$
|
551
|
-
peg$
|
552
|
-
peg$
|
553
|
-
peg$
|
554
|
-
peg$
|
555
|
-
peg$
|
556
|
-
peg$
|
557
|
-
peg$
|
558
|
-
peg$
|
559
|
-
peg$
|
560
|
-
peg$
|
561
|
-
peg$
|
562
|
-
peg$
|
563
|
-
peg$
|
564
|
-
peg$
|
565
|
-
peg$
|
566
|
-
peg$
|
567
|
-
peg$
|
568
|
-
peg$
|
569
|
-
peg$
|
570
|
-
peg$
|
571
|
-
peg$
|
572
|
-
peg$
|
573
|
-
peg$
|
574
|
-
peg$
|
575
|
-
peg$
|
576
|
-
peg$
|
577
|
-
peg$
|
578
|
-
peg$
|
579
|
-
peg$
|
580
|
-
peg$
|
581
|
-
peg$
|
582
|
-
peg$
|
583
|
-
peg$
|
584
|
-
peg$
|
585
|
-
|
586
|
-
shorthandAttributes = h[1] || [],
|
587
|
-
id = shorthandAttributes[0],
|
588
|
-
classes = shorthandAttributes[1] || [],
|
589
|
-
tagOpenContent = [],
|
590
|
-
updateMustacheNode;
|
591
|
-
|
592
|
-
updateMustacheNode = function (node) {
|
593
|
-
var pairs, pair, stringNode, original;
|
594
|
-
if (!classes.length) {
|
595
|
-
return;
|
596
|
-
}
|
597
|
-
if (!node.id || node.id.string !== 'bind-attr') {
|
598
|
-
return;
|
599
|
-
}
|
600
|
-
if (node.hash && node.hash.pairs && (pairs = node.hash.pairs)) {
|
601
|
-
for (var i2 in pairs) {
|
602
|
-
if (!pairs.hasOwnProperty(i2)) { continue; }
|
603
|
-
pair = pairs[i2];
|
604
|
-
if (pair && pair[0] === 'class' && pair[1] instanceof AST.StringNode) {
|
605
|
-
stringNode = pair[1];
|
606
|
-
original = stringNode.original;
|
607
|
-
stringNode.original = stringNode.string = stringNode.stringModeValue = ':' + classes.join(' :') + ' ' + original;
|
608
|
-
classes = [];
|
609
|
-
}
|
610
|
-
}
|
611
|
-
}
|
612
|
-
};
|
613
|
-
|
614
|
-
tagOpenContent.push(new AST.ContentNode('<' + tagName));
|
615
|
-
|
616
|
-
if(id) {
|
617
|
-
tagOpenContent.push(new AST.ContentNode(' id="' + id + '"'));
|
618
|
-
}
|
619
|
-
|
620
|
-
// Pad in tag mustaches with spaces.
|
621
|
-
for(var i = 0; i < inTagMustaches.length; ++i) {
|
622
|
-
// Check if given mustache node has class bindings and prepend shorthand classes
|
623
|
-
updateMustacheNode(inTagMustaches[i]);
|
624
|
-
tagOpenContent.push(new AST.ContentNode(' '));
|
625
|
-
tagOpenContent.push(inTagMustaches[i]);
|
626
|
-
}
|
627
|
-
|
628
|
-
for(var i = 0; i < fullAttributes.length; ++i) {
|
629
|
-
for (var i2 in fullAttributes[i]) {
|
630
|
-
if (fullAttributes[i][i2] instanceof AST.MustacheNode) {
|
631
|
-
updateMustacheNode(fullAttributes[i][i2]);
|
632
|
-
}
|
633
|
-
}
|
634
|
-
|
635
|
-
if (classes.length) {
|
636
|
-
var isClassAttr = fullAttributes[i][1] && fullAttributes[i][1].string === 'class="';
|
637
|
-
|
638
|
-
// Check if attribute is class attribute and has content
|
639
|
-
if (isClassAttr && fullAttributes[i].length === 4) {
|
640
|
-
if (fullAttributes[i][2].type == 'mustache') {
|
641
|
-
var mustacheNode, classesContent, hash, params;
|
642
|
-
// If class was mustache binding, transform attribute into bind-attr MustacheNode
|
643
|
-
// In case of 'div.shorthand class=varBinding' will transform into '<div {{bind-attr class=":shorthand varBinding"}}'
|
644
|
-
mustacheNode = fullAttributes[i][2];
|
645
|
-
classesContent = ':' + classes.join(' :') + ' ' + mustacheNode.id.original;
|
646
|
-
hash = new AST.HashNode([
|
647
|
-
['class', new AST.StringNode(classesContent)]
|
648
|
-
]);
|
649
|
-
|
650
|
-
params = [new AST.IdNode([{ part: 'bind-attr'}])].concat(mustacheNode.params);
|
651
|
-
fullAttributes[i] = [fullAttributes[i][0], createMustacheNode(params, hash, true)];
|
652
|
-
} else {
|
653
|
-
// Else prepend shorthand classes to attribute
|
654
|
-
classes.push(fullAttributes[i][2].string);
|
655
|
-
fullAttributes[i][2].string = classes.join(' ');
|
656
|
-
}
|
657
|
-
classes = [];
|
658
|
-
}
|
659
|
-
}
|
660
|
-
|
661
|
-
tagOpenContent = tagOpenContent.concat(fullAttributes[i]);
|
662
|
-
}
|
663
|
-
|
664
|
-
if(classes && classes.length) {
|
665
|
-
tagOpenContent.push(new AST.ContentNode(' class="' + classes.join(' ') + '"'));
|
666
|
-
}
|
667
|
-
|
668
|
-
var closingTagSlashPresent = !!h[2];
|
669
|
-
if(SELF_CLOSING_TAG[tagName] || closingTagSlashPresent) {
|
670
|
-
tagOpenContent.push(new AST.ContentNode(' />'));
|
671
|
-
return [tagOpenContent];
|
672
|
-
} else {
|
673
|
-
tagOpenContent.push(new AST.ContentNode('>'));
|
674
|
-
return [tagOpenContent, new AST.ContentNode('</' + tagName + '>')];
|
675
|
-
}
|
519
|
+
peg$c118 = function(m) { m.escaped = true; return m; },
|
520
|
+
peg$c119 = function(m) { m.escaped = false; return m; },
|
521
|
+
peg$c120 = function(a) { return new AST.ContentNode(a); },
|
522
|
+
peg$c121 = "any character",
|
523
|
+
peg$c122 = "SingleMustacheOpen",
|
524
|
+
peg$c123 = "DoubleMustacheOpen",
|
525
|
+
peg$c124 = "{{",
|
526
|
+
peg$c125 = "\"{{\"",
|
527
|
+
peg$c126 = "TripleMustacheOpen",
|
528
|
+
peg$c127 = "{{{",
|
529
|
+
peg$c128 = "\"{{{\"",
|
530
|
+
peg$c129 = "SingleMustacheClose",
|
531
|
+
peg$c130 = "}",
|
532
|
+
peg$c131 = "\"}\"",
|
533
|
+
peg$c132 = "DoubleMustacheClose",
|
534
|
+
peg$c133 = "}}",
|
535
|
+
peg$c134 = "\"}}\"",
|
536
|
+
peg$c135 = "TripleMustacheClose",
|
537
|
+
peg$c136 = "}}}",
|
538
|
+
peg$c137 = "\"}}}\"",
|
539
|
+
peg$c138 = "SubexpressionOpen",
|
540
|
+
peg$c139 = "(",
|
541
|
+
peg$c140 = "\"(\"",
|
542
|
+
peg$c141 = "SubexpressionClose",
|
543
|
+
peg$c142 = ")",
|
544
|
+
peg$c143 = "\")\"",
|
545
|
+
peg$c144 = "InterpolationOpen",
|
546
|
+
peg$c145 = "#{",
|
547
|
+
peg$c146 = "\"#{\"",
|
548
|
+
peg$c147 = "InterpolationClose",
|
549
|
+
peg$c148 = "==",
|
550
|
+
peg$c149 = "\"==\"",
|
551
|
+
peg$c150 = function() { return false; },
|
552
|
+
peg$c151 = function() { return true; },
|
553
|
+
peg$c152 = function(h, s) { return h || s; },
|
554
|
+
peg$c153 = function(h, inTagMustaches, fullAttributes) {
|
555
|
+
return parseInHtml(h, inTagMustaches, fullAttributes)
|
676
556
|
},
|
677
|
-
peg$
|
678
|
-
peg$
|
679
|
-
peg$
|
557
|
+
peg$c154 = function(s) { return { shorthand: s, id: true}; },
|
558
|
+
peg$c155 = function(s) { return { shorthand: s }; },
|
559
|
+
peg$c156 = function(shorthands) {
|
680
560
|
var id, classes = [];
|
681
561
|
for(var i = 0, len = shorthands.length; i < len; ++i) {
|
682
562
|
var shorthand = shorthands[i];
|
@@ -689,42 +569,42 @@ Emblem.Parser = (function() {
|
|
689
569
|
|
690
570
|
return [id, classes];
|
691
571
|
},
|
692
|
-
peg$
|
572
|
+
peg$c157 = function(a) {
|
693
573
|
if (a.length) {
|
694
574
|
return [new AST.ContentNode(' ')].concat(a);
|
695
575
|
} else {
|
696
576
|
return [];
|
697
577
|
}
|
698
578
|
},
|
699
|
-
peg$
|
700
|
-
peg$
|
701
|
-
peg$
|
702
|
-
peg$
|
579
|
+
peg$c158 = /^[A-Za-z.0-9_\-]/,
|
580
|
+
peg$c159 = "[A-Za-z.0-9_\\-]",
|
581
|
+
peg$c160 = function(id) { return createMustacheNode([id], null, true); },
|
582
|
+
peg$c161 = function(event, mustacheNode) {
|
703
583
|
// Replace the IdNode with a StringNode to prevent unquoted action deprecation warnings
|
704
584
|
mustacheNode.id = new AST.StringNode(mustacheNode.id.string);
|
705
585
|
|
706
586
|
// Unshift the action helper and augment the hash
|
707
587
|
return [unshiftParam(mustacheNode, 'action', [['on', new AST.StringNode(event)]])];
|
708
588
|
},
|
709
|
-
peg$
|
589
|
+
peg$c162 = function(key, boolValue) {
|
710
590
|
if (boolValue === 'true') {
|
711
591
|
return [ new AST.ContentNode(key) ];
|
712
592
|
} else {
|
713
593
|
return [];
|
714
594
|
}
|
715
595
|
},
|
716
|
-
peg$
|
717
|
-
peg$
|
718
|
-
peg$
|
719
|
-
peg$
|
720
|
-
peg$
|
596
|
+
peg$c163 = function(value) { return value.replace(/ *$/, ''); },
|
597
|
+
peg$c164 = "!",
|
598
|
+
peg$c165 = "\"!\"",
|
599
|
+
peg$c166 = function(key, value) { return IS_EMBER; },
|
600
|
+
peg$c167 = function(key, value) {
|
721
601
|
var hashNode = new AST.HashNode([[key, new AST.StringNode(value)]]);
|
722
602
|
var params = [new AST.IdNode([{part: 'bind-attr'}])];
|
723
603
|
var mustacheNode = createMustacheNode(params, hashNode);
|
724
604
|
|
725
605
|
return [mustacheNode];
|
726
606
|
},
|
727
|
-
peg$
|
607
|
+
peg$c168 = function(key, id) {
|
728
608
|
var mustacheNode = createMustacheNode([id], null, true);
|
729
609
|
|
730
610
|
if(IS_EMBER && id._emblemSuffixModifier === '!') {
|
@@ -737,52 +617,52 @@ Emblem.Parser = (function() {
|
|
737
617
|
new AST.ContentNode('"'),
|
738
618
|
];
|
739
619
|
},
|
740
|
-
peg$
|
620
|
+
peg$c169 = function(key, nodes) {
|
741
621
|
var result = [ new AST.ContentNode(key + '=' + '"') ].concat(nodes);
|
742
622
|
return result.concat([new AST.ContentNode('"')]);
|
743
623
|
},
|
744
|
-
peg$
|
745
|
-
peg$
|
746
|
-
peg$
|
747
|
-
peg$
|
748
|
-
peg$
|
749
|
-
peg$
|
750
|
-
peg$
|
751
|
-
peg$
|
752
|
-
peg$
|
753
|
-
peg$
|
754
|
-
peg$
|
755
|
-
peg$
|
756
|
-
peg$
|
757
|
-
peg$
|
758
|
-
peg$
|
759
|
-
peg$
|
760
|
-
peg$
|
761
|
-
peg$
|
762
|
-
peg$
|
763
|
-
peg$
|
764
|
-
peg$
|
765
|
-
peg$
|
766
|
-
peg$
|
767
|
-
peg$
|
768
|
-
peg$
|
769
|
-
peg$
|
770
|
-
peg$
|
771
|
-
peg$
|
772
|
-
peg$
|
773
|
-
peg$
|
774
|
-
peg$
|
775
|
-
peg$
|
776
|
-
peg$
|
777
|
-
peg$
|
778
|
-
peg$
|
779
|
-
peg$
|
780
|
-
peg$
|
781
|
-
peg$
|
782
|
-
peg$
|
783
|
-
peg$
|
784
|
-
peg$
|
785
|
-
peg$
|
624
|
+
peg$c170 = "_",
|
625
|
+
peg$c171 = "\"_\"",
|
626
|
+
peg$c172 = "%",
|
627
|
+
peg$c173 = "\"%\"",
|
628
|
+
peg$c174 = "#",
|
629
|
+
peg$c175 = "\"#\"",
|
630
|
+
peg$c176 = function(c) { return c;},
|
631
|
+
peg$c177 = "CSSIdentifier",
|
632
|
+
peg$c178 = /^[_a-zA-Z0-9\-]/,
|
633
|
+
peg$c179 = "[_a-zA-Z0-9\\-]",
|
634
|
+
peg$c180 = /^[_a-zA-Z]/,
|
635
|
+
peg$c181 = "[_a-zA-Z]",
|
636
|
+
peg$c182 = /^[\x80-\xFF]/,
|
637
|
+
peg$c183 = "[\\x80-\\xFF]",
|
638
|
+
peg$c184 = "KnownHTMLTagName",
|
639
|
+
peg$c185 = function(t) { return !!KNOWN_TAGS[t]; },
|
640
|
+
peg$c186 = function(t) { return t; },
|
641
|
+
peg$c187 = "a JS event",
|
642
|
+
peg$c188 = function(t) { return !!KNOWN_EVENTS[t]; },
|
643
|
+
peg$c189 = "INDENT",
|
644
|
+
peg$c190 = "\uEFEF",
|
645
|
+
peg$c191 = "\"\\uEFEF\"",
|
646
|
+
peg$c192 = function() { return ''; },
|
647
|
+
peg$c193 = "DEDENT",
|
648
|
+
peg$c194 = "\uEFFE",
|
649
|
+
peg$c195 = "\"\\uEFFE\"",
|
650
|
+
peg$c196 = "Unmatched DEDENT",
|
651
|
+
peg$c197 = "\uEFEE",
|
652
|
+
peg$c198 = "\"\\uEFEE\"",
|
653
|
+
peg$c199 = "LineEnd",
|
654
|
+
peg$c200 = "\r",
|
655
|
+
peg$c201 = "\"\\r\"",
|
656
|
+
peg$c202 = "\uEFFF",
|
657
|
+
peg$c203 = "\"\\uEFFF\"",
|
658
|
+
peg$c204 = "\n",
|
659
|
+
peg$c205 = "\"\\n\"",
|
660
|
+
peg$c206 = "ANYDEDENT",
|
661
|
+
peg$c207 = "RequiredWhitespace",
|
662
|
+
peg$c208 = "OptionalWhitespace",
|
663
|
+
peg$c209 = "InlineWhitespace",
|
664
|
+
peg$c210 = /^[ \t]/,
|
665
|
+
peg$c211 = "[ \\t]",
|
786
666
|
|
787
667
|
peg$currPos = 0,
|
788
668
|
peg$reportedPos = 0,
|
@@ -1565,8 +1445,47 @@ Emblem.Parser = (function() {
|
|
1565
1445
|
return s0;
|
1566
1446
|
}
|
1567
1447
|
|
1448
|
+
function peg$parseunindentedContent() {
|
1449
|
+
var s0, s1, s2, s3;
|
1450
|
+
|
1451
|
+
s0 = peg$currPos;
|
1452
|
+
s1 = [];
|
1453
|
+
s2 = peg$parseblankLine();
|
1454
|
+
while (s2 !== null) {
|
1455
|
+
s1.push(s2);
|
1456
|
+
s2 = peg$parseblankLine();
|
1457
|
+
}
|
1458
|
+
if (s1 !== null) {
|
1459
|
+
s2 = peg$parsecontent();
|
1460
|
+
if (s2 !== null) {
|
1461
|
+
s3 = peg$parseDEDENT();
|
1462
|
+
if (s3 !== null) {
|
1463
|
+
peg$reportedPos = s0;
|
1464
|
+
s1 = peg$c28(s2);
|
1465
|
+
if (s1 === null) {
|
1466
|
+
peg$currPos = s0;
|
1467
|
+
s0 = s1;
|
1468
|
+
} else {
|
1469
|
+
s0 = s1;
|
1470
|
+
}
|
1471
|
+
} else {
|
1472
|
+
peg$currPos = s0;
|
1473
|
+
s0 = peg$c0;
|
1474
|
+
}
|
1475
|
+
} else {
|
1476
|
+
peg$currPos = s0;
|
1477
|
+
s0 = peg$c0;
|
1478
|
+
}
|
1479
|
+
} else {
|
1480
|
+
peg$currPos = s0;
|
1481
|
+
s0 = peg$c0;
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
return s0;
|
1485
|
+
}
|
1486
|
+
|
1568
1487
|
function peg$parsehtmlTerminator() {
|
1569
|
-
var s0, s1, s2, s3, s4;
|
1488
|
+
var s0, s1, s2, s3, s4, s5;
|
1570
1489
|
|
1571
1490
|
s0 = peg$parsecolonContent();
|
1572
1491
|
if (s0 === null) {
|
@@ -1632,7 +1551,71 @@ Emblem.Parser = (function() {
|
|
1632
1551
|
s0 = peg$c0;
|
1633
1552
|
}
|
1634
1553
|
if (s0 === null) {
|
1635
|
-
s0 = peg$
|
1554
|
+
s0 = peg$currPos;
|
1555
|
+
s1 = peg$parse_();
|
1556
|
+
if (s1 !== null) {
|
1557
|
+
s2 = peg$parseinlineComment();
|
1558
|
+
if (s2 === null) {
|
1559
|
+
s2 = peg$c1;
|
1560
|
+
}
|
1561
|
+
if (s2 !== null) {
|
1562
|
+
if (input.charCodeAt(peg$currPos) === 93) {
|
1563
|
+
s3 = peg$c30;
|
1564
|
+
peg$currPos++;
|
1565
|
+
} else {
|
1566
|
+
s3 = null;
|
1567
|
+
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
1568
|
+
}
|
1569
|
+
if (s3 !== null) {
|
1570
|
+
s4 = peg$parseTERM();
|
1571
|
+
if (s4 !== null) {
|
1572
|
+
s5 = peg$parseunindentedContent();
|
1573
|
+
if (s5 === null) {
|
1574
|
+
s5 = peg$c1;
|
1575
|
+
}
|
1576
|
+
if (s5 !== null) {
|
1577
|
+
peg$reportedPos = s0;
|
1578
|
+
s1 = peg$c28(s5);
|
1579
|
+
if (s1 === null) {
|
1580
|
+
peg$currPos = s0;
|
1581
|
+
s0 = s1;
|
1582
|
+
} else {
|
1583
|
+
s0 = s1;
|
1584
|
+
}
|
1585
|
+
} else {
|
1586
|
+
peg$currPos = s0;
|
1587
|
+
s0 = peg$c0;
|
1588
|
+
}
|
1589
|
+
} else {
|
1590
|
+
peg$currPos = s0;
|
1591
|
+
s0 = peg$c0;
|
1592
|
+
}
|
1593
|
+
} else {
|
1594
|
+
peg$currPos = s0;
|
1595
|
+
s0 = peg$c0;
|
1596
|
+
}
|
1597
|
+
} else {
|
1598
|
+
peg$currPos = s0;
|
1599
|
+
s0 = peg$c0;
|
1600
|
+
}
|
1601
|
+
} else {
|
1602
|
+
peg$currPos = s0;
|
1603
|
+
s0 = peg$c0;
|
1604
|
+
}
|
1605
|
+
if (s0 === null) {
|
1606
|
+
s0 = peg$currPos;
|
1607
|
+
s1 = peg$parsehtmlNestedTextNodes();
|
1608
|
+
if (s1 !== null) {
|
1609
|
+
peg$reportedPos = s0;
|
1610
|
+
s1 = peg$c32(s1);
|
1611
|
+
}
|
1612
|
+
if (s1 === null) {
|
1613
|
+
peg$currPos = s0;
|
1614
|
+
s0 = s1;
|
1615
|
+
} else {
|
1616
|
+
s0 = s1;
|
1617
|
+
}
|
1618
|
+
}
|
1636
1619
|
}
|
1637
1620
|
}
|
1638
1621
|
}
|
@@ -1649,7 +1632,7 @@ Emblem.Parser = (function() {
|
|
1649
1632
|
s2 = peg$parsehtmlTerminator();
|
1650
1633
|
if (s2 !== null) {
|
1651
1634
|
peg$reportedPos = s0;
|
1652
|
-
s1 = peg$
|
1635
|
+
s1 = peg$c33(s1, s2);
|
1653
1636
|
if (s1 === null) {
|
1654
1637
|
peg$currPos = s0;
|
1655
1638
|
s0 = s1;
|
@@ -1684,7 +1667,7 @@ Emblem.Parser = (function() {
|
|
1684
1667
|
s4 = peg$parsemustacheNestedContent();
|
1685
1668
|
if (s4 !== null) {
|
1686
1669
|
peg$reportedPos = s0;
|
1687
|
-
s1 = peg$
|
1670
|
+
s1 = peg$c34(s1, s4);
|
1688
1671
|
if (s1 === null) {
|
1689
1672
|
peg$currPos = s0;
|
1690
1673
|
s0 = s1;
|
@@ -1801,12 +1784,12 @@ Emblem.Parser = (function() {
|
|
1801
1784
|
var s0, s1, s2, s3;
|
1802
1785
|
|
1803
1786
|
s0 = peg$currPos;
|
1804
|
-
if (input.substr(peg$currPos, 2) === peg$
|
1805
|
-
s1 = peg$
|
1787
|
+
if (input.substr(peg$currPos, 2) === peg$c35) {
|
1788
|
+
s1 = peg$c35;
|
1806
1789
|
peg$currPos += 2;
|
1807
1790
|
} else {
|
1808
1791
|
s1 = null;
|
1809
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
1792
|
+
if (peg$silentFails === 0) { peg$fail(peg$c36); }
|
1810
1793
|
}
|
1811
1794
|
if (s1 !== null) {
|
1812
1795
|
s2 = peg$parse_();
|
@@ -1847,7 +1830,7 @@ Emblem.Parser = (function() {
|
|
1847
1830
|
}
|
1848
1831
|
if (s1 !== null) {
|
1849
1832
|
peg$reportedPos = s0;
|
1850
|
-
s1 = peg$
|
1833
|
+
s1 = peg$c37(s1);
|
1851
1834
|
}
|
1852
1835
|
if (s1 === null) {
|
1853
1836
|
peg$currPos = s0;
|
@@ -1857,24 +1840,77 @@ Emblem.Parser = (function() {
|
|
1857
1840
|
}
|
1858
1841
|
if (s0 === null) {
|
1859
1842
|
s0 = peg$currPos;
|
1860
|
-
s1 = peg$
|
1843
|
+
s1 = peg$parse_();
|
1861
1844
|
if (s1 !== null) {
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1845
|
+
if (input.charCodeAt(peg$currPos) === 93) {
|
1846
|
+
s2 = peg$c30;
|
1847
|
+
peg$currPos++;
|
1848
|
+
} else {
|
1849
|
+
s2 = null;
|
1850
|
+
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
1868
1851
|
}
|
1869
|
-
if (
|
1870
|
-
|
1871
|
-
if (
|
1872
|
-
|
1873
|
-
if (
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1852
|
+
if (s2 !== null) {
|
1853
|
+
s3 = peg$parseTERM();
|
1854
|
+
if (s3 !== null) {
|
1855
|
+
s4 = peg$parsecolonContent();
|
1856
|
+
if (s4 === null) {
|
1857
|
+
s4 = peg$parsetextLine();
|
1858
|
+
}
|
1859
|
+
if (s4 !== null) {
|
1860
|
+
s5 = peg$parseDEDENT();
|
1861
|
+
if (s5 !== null) {
|
1862
|
+
peg$reportedPos = s0;
|
1863
|
+
s1 = peg$c37(s4);
|
1864
|
+
if (s1 === null) {
|
1865
|
+
peg$currPos = s0;
|
1866
|
+
s0 = s1;
|
1867
|
+
} else {
|
1868
|
+
s0 = s1;
|
1869
|
+
}
|
1870
|
+
} else {
|
1871
|
+
peg$currPos = s0;
|
1872
|
+
s0 = peg$c0;
|
1873
|
+
}
|
1874
|
+
} else {
|
1875
|
+
peg$currPos = s0;
|
1876
|
+
s0 = peg$c0;
|
1877
|
+
}
|
1878
|
+
} else {
|
1879
|
+
peg$currPos = s0;
|
1880
|
+
s0 = peg$c0;
|
1881
|
+
}
|
1882
|
+
} else {
|
1883
|
+
peg$currPos = s0;
|
1884
|
+
s0 = peg$c0;
|
1885
|
+
}
|
1886
|
+
} else {
|
1887
|
+
peg$currPos = s0;
|
1888
|
+
s0 = peg$c0;
|
1889
|
+
}
|
1890
|
+
if (s0 === null) {
|
1891
|
+
s0 = peg$currPos;
|
1892
|
+
s1 = peg$parseTERM();
|
1893
|
+
if (s1 !== null) {
|
1894
|
+
s2 = peg$currPos;
|
1895
|
+
s3 = [];
|
1896
|
+
s4 = peg$parseblankLine();
|
1897
|
+
while (s4 !== null) {
|
1898
|
+
s3.push(s4);
|
1899
|
+
s4 = peg$parseblankLine();
|
1900
|
+
}
|
1901
|
+
if (s3 !== null) {
|
1902
|
+
s4 = peg$parseindentation();
|
1903
|
+
if (s4 !== null) {
|
1904
|
+
s5 = peg$parseinvertibleContent();
|
1905
|
+
if (s5 !== null) {
|
1906
|
+
s6 = peg$parseDEDENT();
|
1907
|
+
if (s6 !== null) {
|
1908
|
+
s3 = [s3, s4, s5, s6];
|
1909
|
+
s2 = s3;
|
1910
|
+
} else {
|
1911
|
+
peg$currPos = s2;
|
1912
|
+
s2 = peg$c0;
|
1913
|
+
}
|
1878
1914
|
} else {
|
1879
1915
|
peg$currPos = s2;
|
1880
1916
|
s2 = peg$c0;
|
@@ -1887,29 +1923,73 @@ Emblem.Parser = (function() {
|
|
1887
1923
|
peg$currPos = s2;
|
1888
1924
|
s2 = peg$c0;
|
1889
1925
|
}
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
s0 = s1;
|
1926
|
+
if (s2 === null) {
|
1927
|
+
s2 = peg$c1;
|
1928
|
+
}
|
1929
|
+
if (s2 !== null) {
|
1930
|
+
peg$reportedPos = s0;
|
1931
|
+
s1 = peg$c38(s2);
|
1932
|
+
if (s1 === null) {
|
1933
|
+
peg$currPos = s0;
|
1934
|
+
s0 = s1;
|
1935
|
+
} else {
|
1936
|
+
s0 = s1;
|
1937
|
+
}
|
1903
1938
|
} else {
|
1904
|
-
|
1939
|
+
peg$currPos = s0;
|
1940
|
+
s0 = peg$c0;
|
1905
1941
|
}
|
1906
1942
|
} else {
|
1907
1943
|
peg$currPos = s0;
|
1908
1944
|
s0 = peg$c0;
|
1909
1945
|
}
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1946
|
+
if (s0 === null) {
|
1947
|
+
s0 = peg$currPos;
|
1948
|
+
s1 = peg$parse_();
|
1949
|
+
if (s1 !== null) {
|
1950
|
+
if (input.charCodeAt(peg$currPos) === 93) {
|
1951
|
+
s2 = peg$c30;
|
1952
|
+
peg$currPos++;
|
1953
|
+
} else {
|
1954
|
+
s2 = null;
|
1955
|
+
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
1956
|
+
}
|
1957
|
+
if (s2 !== null) {
|
1958
|
+
s3 = peg$parseTERM();
|
1959
|
+
if (s3 !== null) {
|
1960
|
+
s4 = peg$parseinvertibleContent();
|
1961
|
+
if (s4 !== null) {
|
1962
|
+
s5 = peg$parseDEDENT();
|
1963
|
+
if (s5 !== null) {
|
1964
|
+
peg$reportedPos = s0;
|
1965
|
+
s1 = peg$c39(s4);
|
1966
|
+
if (s1 === null) {
|
1967
|
+
peg$currPos = s0;
|
1968
|
+
s0 = s1;
|
1969
|
+
} else {
|
1970
|
+
s0 = s1;
|
1971
|
+
}
|
1972
|
+
} else {
|
1973
|
+
peg$currPos = s0;
|
1974
|
+
s0 = peg$c0;
|
1975
|
+
}
|
1976
|
+
} else {
|
1977
|
+
peg$currPos = s0;
|
1978
|
+
s0 = peg$c0;
|
1979
|
+
}
|
1980
|
+
} else {
|
1981
|
+
peg$currPos = s0;
|
1982
|
+
s0 = peg$c0;
|
1983
|
+
}
|
1984
|
+
} else {
|
1985
|
+
peg$currPos = s0;
|
1986
|
+
s0 = peg$c0;
|
1987
|
+
}
|
1988
|
+
} else {
|
1989
|
+
peg$currPos = s0;
|
1990
|
+
s0 = peg$c0;
|
1991
|
+
}
|
1992
|
+
}
|
1913
1993
|
}
|
1914
1994
|
}
|
1915
1995
|
|
@@ -1925,7 +2005,7 @@ Emblem.Parser = (function() {
|
|
1925
2005
|
s2 = peg$parsemustacheOrBlock();
|
1926
2006
|
if (s2 !== null) {
|
1927
2007
|
peg$reportedPos = s0;
|
1928
|
-
s1 = peg$
|
2008
|
+
s1 = peg$c40(s1, s2);
|
1929
2009
|
if (s1 === null) {
|
1930
2010
|
peg$currPos = s0;
|
1931
2011
|
s0 = s1;
|
@@ -1945,7 +2025,7 @@ Emblem.Parser = (function() {
|
|
1945
2025
|
}
|
1946
2026
|
|
1947
2027
|
function peg$parseinMustache() {
|
1948
|
-
var s0, s1, s2, s3;
|
2028
|
+
var s0, s1, s2, s3, s4, s5;
|
1949
2029
|
|
1950
2030
|
s0 = peg$currPos;
|
1951
2031
|
if (input.charCodeAt(peg$currPos) === 62) {
|
@@ -1959,17 +2039,52 @@ Emblem.Parser = (function() {
|
|
1959
2039
|
s1 = peg$c1;
|
1960
2040
|
}
|
1961
2041
|
if (s1 !== null) {
|
1962
|
-
s2 = peg$
|
2042
|
+
s2 = peg$currPos;
|
2043
|
+
peg$silentFails++;
|
2044
|
+
s3 = peg$currPos;
|
2045
|
+
if (input.charCodeAt(peg$currPos) === 91) {
|
2046
|
+
s4 = peg$c41;
|
2047
|
+
peg$currPos++;
|
2048
|
+
} else {
|
2049
|
+
s4 = null;
|
2050
|
+
if (peg$silentFails === 0) { peg$fail(peg$c42); }
|
2051
|
+
}
|
2052
|
+
if (s4 !== null) {
|
2053
|
+
s5 = peg$parseTERM();
|
2054
|
+
if (s5 !== null) {
|
2055
|
+
s4 = [s4, s5];
|
2056
|
+
s3 = s4;
|
2057
|
+
} else {
|
2058
|
+
peg$currPos = s3;
|
2059
|
+
s3 = peg$c0;
|
2060
|
+
}
|
2061
|
+
} else {
|
2062
|
+
peg$currPos = s3;
|
2063
|
+
s3 = peg$c0;
|
2064
|
+
}
|
2065
|
+
peg$silentFails--;
|
2066
|
+
if (s3 === null) {
|
2067
|
+
s2 = peg$c1;
|
2068
|
+
} else {
|
2069
|
+
peg$currPos = s2;
|
2070
|
+
s2 = peg$c0;
|
2071
|
+
}
|
1963
2072
|
if (s2 !== null) {
|
1964
|
-
s3 = peg$
|
2073
|
+
s3 = peg$parse_();
|
1965
2074
|
if (s3 !== null) {
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
peg$
|
1970
|
-
|
2075
|
+
s4 = peg$parsesexpr();
|
2076
|
+
if (s4 !== null) {
|
2077
|
+
peg$reportedPos = s0;
|
2078
|
+
s1 = peg$c43(s1, s4);
|
2079
|
+
if (s1 === null) {
|
2080
|
+
peg$currPos = s0;
|
2081
|
+
s0 = s1;
|
2082
|
+
} else {
|
2083
|
+
s0 = s1;
|
2084
|
+
}
|
1971
2085
|
} else {
|
1972
|
-
|
2086
|
+
peg$currPos = s0;
|
2087
|
+
s0 = peg$c0;
|
1973
2088
|
}
|
1974
2089
|
} else {
|
1975
2090
|
peg$currPos = s0;
|
@@ -1988,30 +2103,51 @@ Emblem.Parser = (function() {
|
|
1988
2103
|
}
|
1989
2104
|
|
1990
2105
|
function peg$parsesexpr() {
|
1991
|
-
var s0, s1, s2, s3;
|
2106
|
+
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
1992
2107
|
|
1993
2108
|
s0 = peg$currPos;
|
1994
2109
|
s1 = peg$parsepathIdNode();
|
1995
2110
|
if (s1 !== null) {
|
1996
|
-
s2 =
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2111
|
+
s2 = peg$currPos;
|
2112
|
+
peg$silentFails++;
|
2113
|
+
if (input.substr(peg$currPos, 2) === peg$c44) {
|
2114
|
+
s3 = peg$c44;
|
2115
|
+
peg$currPos += 2;
|
2116
|
+
} else {
|
2117
|
+
s3 = null;
|
2118
|
+
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
2119
|
+
}
|
2120
|
+
peg$silentFails--;
|
2121
|
+
if (s3 === null) {
|
2122
|
+
s2 = peg$c1;
|
2123
|
+
} else {
|
2124
|
+
peg$currPos = s2;
|
2125
|
+
s2 = peg$c0;
|
2001
2126
|
}
|
2002
2127
|
if (s2 !== null) {
|
2003
|
-
s3 =
|
2004
|
-
|
2005
|
-
|
2128
|
+
s3 = [];
|
2129
|
+
s4 = peg$parseinMustacheParam();
|
2130
|
+
while (s4 !== null) {
|
2131
|
+
s3.push(s4);
|
2132
|
+
s4 = peg$parseinMustacheParam();
|
2006
2133
|
}
|
2007
2134
|
if (s3 !== null) {
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2135
|
+
s4 = peg$parsehash();
|
2136
|
+
if (s4 === null) {
|
2137
|
+
s4 = peg$c1;
|
2138
|
+
}
|
2139
|
+
if (s4 !== null) {
|
2140
|
+
peg$reportedPos = s0;
|
2141
|
+
s1 = peg$c46(s1, s3, s4);
|
2142
|
+
if (s1 === null) {
|
2143
|
+
peg$currPos = s0;
|
2144
|
+
s0 = s1;
|
2145
|
+
} else {
|
2146
|
+
s0 = s1;
|
2147
|
+
}
|
2013
2148
|
} else {
|
2014
|
-
|
2149
|
+
peg$currPos = s0;
|
2150
|
+
s0 = peg$c0;
|
2015
2151
|
}
|
2016
2152
|
} else {
|
2017
2153
|
peg$currPos = s0;
|
@@ -2025,6 +2161,95 @@ Emblem.Parser = (function() {
|
|
2025
2161
|
peg$currPos = s0;
|
2026
2162
|
s0 = peg$c0;
|
2027
2163
|
}
|
2164
|
+
if (s0 === null) {
|
2165
|
+
s0 = peg$currPos;
|
2166
|
+
s1 = peg$parsepathIdNode();
|
2167
|
+
if (s1 !== null) {
|
2168
|
+
s2 = peg$parse_();
|
2169
|
+
if (s2 !== null) {
|
2170
|
+
if (input.charCodeAt(peg$currPos) === 91) {
|
2171
|
+
s3 = peg$c41;
|
2172
|
+
peg$currPos++;
|
2173
|
+
} else {
|
2174
|
+
s3 = null;
|
2175
|
+
if (peg$silentFails === 0) { peg$fail(peg$c42); }
|
2176
|
+
}
|
2177
|
+
if (s3 !== null) {
|
2178
|
+
s4 = peg$parse_();
|
2179
|
+
if (s4 !== null) {
|
2180
|
+
s5 = [];
|
2181
|
+
s6 = peg$parseTERM();
|
2182
|
+
while (s6 !== null) {
|
2183
|
+
s5.push(s6);
|
2184
|
+
s6 = peg$parseTERM();
|
2185
|
+
}
|
2186
|
+
if (s5 !== null) {
|
2187
|
+
s6 = [];
|
2188
|
+
s7 = peg$parseINDENT();
|
2189
|
+
while (s7 !== null) {
|
2190
|
+
s6.push(s7);
|
2191
|
+
s7 = peg$parseINDENT();
|
2192
|
+
}
|
2193
|
+
if (s6 !== null) {
|
2194
|
+
s7 = peg$parse_();
|
2195
|
+
if (s7 !== null) {
|
2196
|
+
s8 = [];
|
2197
|
+
s9 = peg$parseinMustacheBracketedParam();
|
2198
|
+
while (s9 !== null) {
|
2199
|
+
s8.push(s9);
|
2200
|
+
s9 = peg$parseinMustacheBracketedParam();
|
2201
|
+
}
|
2202
|
+
if (s8 !== null) {
|
2203
|
+
s9 = peg$parsebracketedHash();
|
2204
|
+
if (s9 === null) {
|
2205
|
+
s9 = peg$c1;
|
2206
|
+
}
|
2207
|
+
if (s9 !== null) {
|
2208
|
+
peg$reportedPos = s0;
|
2209
|
+
s1 = peg$c46(s1, s8, s9);
|
2210
|
+
if (s1 === null) {
|
2211
|
+
peg$currPos = s0;
|
2212
|
+
s0 = s1;
|
2213
|
+
} else {
|
2214
|
+
s0 = s1;
|
2215
|
+
}
|
2216
|
+
} else {
|
2217
|
+
peg$currPos = s0;
|
2218
|
+
s0 = peg$c0;
|
2219
|
+
}
|
2220
|
+
} else {
|
2221
|
+
peg$currPos = s0;
|
2222
|
+
s0 = peg$c0;
|
2223
|
+
}
|
2224
|
+
} else {
|
2225
|
+
peg$currPos = s0;
|
2226
|
+
s0 = peg$c0;
|
2227
|
+
}
|
2228
|
+
} else {
|
2229
|
+
peg$currPos = s0;
|
2230
|
+
s0 = peg$c0;
|
2231
|
+
}
|
2232
|
+
} else {
|
2233
|
+
peg$currPos = s0;
|
2234
|
+
s0 = peg$c0;
|
2235
|
+
}
|
2236
|
+
} else {
|
2237
|
+
peg$currPos = s0;
|
2238
|
+
s0 = peg$c0;
|
2239
|
+
}
|
2240
|
+
} else {
|
2241
|
+
peg$currPos = s0;
|
2242
|
+
s0 = peg$c0;
|
2243
|
+
}
|
2244
|
+
} else {
|
2245
|
+
peg$currPos = s0;
|
2246
|
+
s0 = peg$c0;
|
2247
|
+
}
|
2248
|
+
} else {
|
2249
|
+
peg$currPos = s0;
|
2250
|
+
s0 = peg$c0;
|
2251
|
+
}
|
2252
|
+
}
|
2028
2253
|
|
2029
2254
|
return s0;
|
2030
2255
|
}
|
@@ -2039,7 +2264,7 @@ Emblem.Parser = (function() {
|
|
2039
2264
|
s3 = peg$parsetagNameShorthand();
|
2040
2265
|
if (s3 !== null) {
|
2041
2266
|
peg$reportedPos = s2;
|
2042
|
-
s3 = peg$
|
2267
|
+
s3 = peg$c47(s3);
|
2043
2268
|
}
|
2044
2269
|
if (s3 === null) {
|
2045
2270
|
peg$currPos = s2;
|
@@ -2052,7 +2277,7 @@ Emblem.Parser = (function() {
|
|
2052
2277
|
s3 = peg$parseidShorthand();
|
2053
2278
|
if (s3 !== null) {
|
2054
2279
|
peg$reportedPos = s2;
|
2055
|
-
s3 = peg$
|
2280
|
+
s3 = peg$c48(s3);
|
2056
2281
|
}
|
2057
2282
|
if (s3 === null) {
|
2058
2283
|
peg$currPos = s2;
|
@@ -2065,7 +2290,7 @@ Emblem.Parser = (function() {
|
|
2065
2290
|
s3 = peg$parseclassShorthand();
|
2066
2291
|
if (s3 !== null) {
|
2067
2292
|
peg$reportedPos = s2;
|
2068
|
-
s3 = peg$
|
2293
|
+
s3 = peg$c49(s3);
|
2069
2294
|
}
|
2070
2295
|
if (s3 === null) {
|
2071
2296
|
peg$currPos = s2;
|
@@ -2077,7 +2302,7 @@ Emblem.Parser = (function() {
|
|
2077
2302
|
}
|
2078
2303
|
if (s2 !== null) {
|
2079
2304
|
peg$reportedPos = s0;
|
2080
|
-
s1 = peg$
|
2305
|
+
s1 = peg$c50(s2);
|
2081
2306
|
if (s1 === null) {
|
2082
2307
|
peg$currPos = s0;
|
2083
2308
|
s0 = s1;
|
@@ -2121,7 +2346,7 @@ Emblem.Parser = (function() {
|
|
2121
2346
|
}
|
2122
2347
|
if (s2 !== null) {
|
2123
2348
|
peg$reportedPos = s0;
|
2124
|
-
s1 = peg$
|
2349
|
+
s1 = peg$c51(s1, s2);
|
2125
2350
|
if (s1 === null) {
|
2126
2351
|
peg$currPos = s0;
|
2127
2352
|
s0 = s1;
|
@@ -2156,7 +2381,7 @@ Emblem.Parser = (function() {
|
|
2156
2381
|
}
|
2157
2382
|
if (s1 !== null) {
|
2158
2383
|
peg$reportedPos = s0;
|
2159
|
-
s1 = peg$
|
2384
|
+
s1 = peg$c52(s1);
|
2160
2385
|
}
|
2161
2386
|
if (s1 === null) {
|
2162
2387
|
peg$currPos = s0;
|
@@ -2180,7 +2405,54 @@ Emblem.Parser = (function() {
|
|
2180
2405
|
s3 = peg$parseparam();
|
2181
2406
|
if (s3 !== null) {
|
2182
2407
|
peg$reportedPos = s1;
|
2183
|
-
s2 = peg$
|
2408
|
+
s2 = peg$c53(s3);
|
2409
|
+
if (s2 === null) {
|
2410
|
+
peg$currPos = s1;
|
2411
|
+
s1 = s2;
|
2412
|
+
} else {
|
2413
|
+
s1 = s2;
|
2414
|
+
}
|
2415
|
+
} else {
|
2416
|
+
peg$currPos = s1;
|
2417
|
+
s1 = peg$c0;
|
2418
|
+
}
|
2419
|
+
} else {
|
2420
|
+
peg$currPos = s1;
|
2421
|
+
s1 = peg$c0;
|
2422
|
+
}
|
2423
|
+
}
|
2424
|
+
if (s1 !== null) {
|
2425
|
+
peg$reportedPos = s0;
|
2426
|
+
s1 = peg$c54(s1);
|
2427
|
+
}
|
2428
|
+
if (s1 === null) {
|
2429
|
+
peg$currPos = s0;
|
2430
|
+
s0 = s1;
|
2431
|
+
} else {
|
2432
|
+
s0 = s1;
|
2433
|
+
}
|
2434
|
+
|
2435
|
+
return s0;
|
2436
|
+
}
|
2437
|
+
|
2438
|
+
function peg$parseinMustacheBracketedParam() {
|
2439
|
+
var s0, s1, s2, s3, s4;
|
2440
|
+
|
2441
|
+
s0 = peg$currPos;
|
2442
|
+
s1 = peg$parsehtmlMustacheAttribute();
|
2443
|
+
if (s1 === null) {
|
2444
|
+
s1 = peg$currPos;
|
2445
|
+
s2 = peg$parseparam();
|
2446
|
+
if (s2 !== null) {
|
2447
|
+
s3 = [];
|
2448
|
+
s4 = peg$parseTERM();
|
2449
|
+
while (s4 !== null) {
|
2450
|
+
s3.push(s4);
|
2451
|
+
s4 = peg$parseTERM();
|
2452
|
+
}
|
2453
|
+
if (s3 !== null) {
|
2454
|
+
peg$reportedPos = s1;
|
2455
|
+
s2 = peg$c53(s2);
|
2184
2456
|
if (s2 === null) {
|
2185
2457
|
peg$currPos = s1;
|
2186
2458
|
s1 = s2;
|
@@ -2198,7 +2470,7 @@ Emblem.Parser = (function() {
|
|
2198
2470
|
}
|
2199
2471
|
if (s1 !== null) {
|
2200
2472
|
peg$reportedPos = s0;
|
2201
|
-
s1 = peg$
|
2473
|
+
s1 = peg$c54(s1);
|
2202
2474
|
}
|
2203
2475
|
if (s1 === null) {
|
2204
2476
|
peg$currPos = s0;
|
@@ -2226,7 +2498,7 @@ Emblem.Parser = (function() {
|
|
2226
2498
|
}
|
2227
2499
|
if (s1 !== null) {
|
2228
2500
|
peg$reportedPos = s0;
|
2229
|
-
s1 = peg$
|
2501
|
+
s1 = peg$c55(s1);
|
2230
2502
|
}
|
2231
2503
|
if (s1 === null) {
|
2232
2504
|
peg$currPos = s0;
|
@@ -2238,45 +2510,110 @@ Emblem.Parser = (function() {
|
|
2238
2510
|
return s0;
|
2239
2511
|
}
|
2240
2512
|
|
2513
|
+
function peg$parsebracketedHash() {
|
2514
|
+
var s0, s1, s2, s3, s4;
|
2515
|
+
|
2516
|
+
s0 = peg$currPos;
|
2517
|
+
s1 = [];
|
2518
|
+
s2 = peg$parseINDENT();
|
2519
|
+
while (s2 !== null) {
|
2520
|
+
s1.push(s2);
|
2521
|
+
s2 = peg$parseINDENT();
|
2522
|
+
}
|
2523
|
+
if (s1 !== null) {
|
2524
|
+
s2 = [];
|
2525
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
2526
|
+
s3 = peg$c25;
|
2527
|
+
peg$currPos++;
|
2528
|
+
} else {
|
2529
|
+
s3 = null;
|
2530
|
+
if (peg$silentFails === 0) { peg$fail(peg$c26); }
|
2531
|
+
}
|
2532
|
+
while (s3 !== null) {
|
2533
|
+
s2.push(s3);
|
2534
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
2535
|
+
s3 = peg$c25;
|
2536
|
+
peg$currPos++;
|
2537
|
+
} else {
|
2538
|
+
s3 = null;
|
2539
|
+
if (peg$silentFails === 0) { peg$fail(peg$c26); }
|
2540
|
+
}
|
2541
|
+
}
|
2542
|
+
if (s2 !== null) {
|
2543
|
+
s3 = [];
|
2544
|
+
s4 = peg$parsebracketedHashSegment();
|
2545
|
+
if (s4 !== null) {
|
2546
|
+
while (s4 !== null) {
|
2547
|
+
s3.push(s4);
|
2548
|
+
s4 = peg$parsebracketedHashSegment();
|
2549
|
+
}
|
2550
|
+
} else {
|
2551
|
+
s3 = peg$c0;
|
2552
|
+
}
|
2553
|
+
if (s3 !== null) {
|
2554
|
+
peg$reportedPos = s0;
|
2555
|
+
s1 = peg$c55(s3);
|
2556
|
+
if (s1 === null) {
|
2557
|
+
peg$currPos = s0;
|
2558
|
+
s0 = s1;
|
2559
|
+
} else {
|
2560
|
+
s0 = s1;
|
2561
|
+
}
|
2562
|
+
} else {
|
2563
|
+
peg$currPos = s0;
|
2564
|
+
s0 = peg$c0;
|
2565
|
+
}
|
2566
|
+
} else {
|
2567
|
+
peg$currPos = s0;
|
2568
|
+
s0 = peg$c0;
|
2569
|
+
}
|
2570
|
+
} else {
|
2571
|
+
peg$currPos = s0;
|
2572
|
+
s0 = peg$c0;
|
2573
|
+
}
|
2574
|
+
|
2575
|
+
return s0;
|
2576
|
+
}
|
2577
|
+
|
2241
2578
|
function peg$parsepathIdent() {
|
2242
2579
|
var s0, s1, s2, s3, s4;
|
2243
2580
|
|
2244
2581
|
peg$silentFails++;
|
2245
|
-
if (input.substr(peg$currPos, 2) === peg$
|
2246
|
-
s0 = peg$
|
2582
|
+
if (input.substr(peg$currPos, 2) === peg$c57) {
|
2583
|
+
s0 = peg$c57;
|
2247
2584
|
peg$currPos += 2;
|
2248
2585
|
} else {
|
2249
2586
|
s0 = null;
|
2250
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2587
|
+
if (peg$silentFails === 0) { peg$fail(peg$c58); }
|
2251
2588
|
}
|
2252
2589
|
if (s0 === null) {
|
2253
2590
|
if (input.charCodeAt(peg$currPos) === 46) {
|
2254
|
-
s0 = peg$
|
2591
|
+
s0 = peg$c59;
|
2255
2592
|
peg$currPos++;
|
2256
2593
|
} else {
|
2257
2594
|
s0 = null;
|
2258
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2595
|
+
if (peg$silentFails === 0) { peg$fail(peg$c60); }
|
2259
2596
|
}
|
2260
2597
|
if (s0 === null) {
|
2261
2598
|
s0 = peg$currPos;
|
2262
2599
|
s1 = peg$currPos;
|
2263
2600
|
s2 = [];
|
2264
|
-
if (peg$
|
2601
|
+
if (peg$c61.test(input.charAt(peg$currPos))) {
|
2265
2602
|
s3 = input.charAt(peg$currPos);
|
2266
2603
|
peg$currPos++;
|
2267
2604
|
} else {
|
2268
2605
|
s3 = null;
|
2269
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2606
|
+
if (peg$silentFails === 0) { peg$fail(peg$c62); }
|
2270
2607
|
}
|
2271
2608
|
if (s3 !== null) {
|
2272
2609
|
while (s3 !== null) {
|
2273
2610
|
s2.push(s3);
|
2274
|
-
if (peg$
|
2611
|
+
if (peg$c61.test(input.charAt(peg$currPos))) {
|
2275
2612
|
s3 = input.charAt(peg$currPos);
|
2276
2613
|
peg$currPos++;
|
2277
2614
|
} else {
|
2278
2615
|
s3 = null;
|
2279
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2616
|
+
if (peg$silentFails === 0) { peg$fail(peg$c62); }
|
2280
2617
|
}
|
2281
2618
|
}
|
2282
2619
|
} else {
|
@@ -2305,7 +2642,7 @@ Emblem.Parser = (function() {
|
|
2305
2642
|
}
|
2306
2643
|
if (s2 !== null) {
|
2307
2644
|
peg$reportedPos = s0;
|
2308
|
-
s1 = peg$
|
2645
|
+
s1 = peg$c63(s1);
|
2309
2646
|
if (s1 === null) {
|
2310
2647
|
peg$currPos = s0;
|
2311
2648
|
s0 = s1;
|
@@ -2323,30 +2660,30 @@ Emblem.Parser = (function() {
|
|
2323
2660
|
if (s0 === null) {
|
2324
2661
|
s0 = peg$currPos;
|
2325
2662
|
if (input.charCodeAt(peg$currPos) === 91) {
|
2326
|
-
s1 = peg$
|
2663
|
+
s1 = peg$c41;
|
2327
2664
|
peg$currPos++;
|
2328
2665
|
} else {
|
2329
2666
|
s1 = null;
|
2330
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2667
|
+
if (peg$silentFails === 0) { peg$fail(peg$c42); }
|
2331
2668
|
}
|
2332
2669
|
if (s1 !== null) {
|
2333
2670
|
s2 = peg$currPos;
|
2334
2671
|
s3 = [];
|
2335
|
-
if (peg$
|
2672
|
+
if (peg$c64.test(input.charAt(peg$currPos))) {
|
2336
2673
|
s4 = input.charAt(peg$currPos);
|
2337
2674
|
peg$currPos++;
|
2338
2675
|
} else {
|
2339
2676
|
s4 = null;
|
2340
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2677
|
+
if (peg$silentFails === 0) { peg$fail(peg$c65); }
|
2341
2678
|
}
|
2342
2679
|
while (s4 !== null) {
|
2343
2680
|
s3.push(s4);
|
2344
|
-
if (peg$
|
2681
|
+
if (peg$c64.test(input.charAt(peg$currPos))) {
|
2345
2682
|
s4 = input.charAt(peg$currPos);
|
2346
2683
|
peg$currPos++;
|
2347
2684
|
} else {
|
2348
2685
|
s4 = null;
|
2349
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2686
|
+
if (peg$silentFails === 0) { peg$fail(peg$c65); }
|
2350
2687
|
}
|
2351
2688
|
}
|
2352
2689
|
if (s3 !== null) {
|
@@ -2355,15 +2692,15 @@ Emblem.Parser = (function() {
|
|
2355
2692
|
s2 = s3;
|
2356
2693
|
if (s2 !== null) {
|
2357
2694
|
if (input.charCodeAt(peg$currPos) === 93) {
|
2358
|
-
s3 = peg$
|
2695
|
+
s3 = peg$c30;
|
2359
2696
|
peg$currPos++;
|
2360
2697
|
} else {
|
2361
2698
|
s3 = null;
|
2362
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2699
|
+
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
2363
2700
|
}
|
2364
2701
|
if (s3 !== null) {
|
2365
2702
|
peg$reportedPos = s0;
|
2366
|
-
s1 = peg$
|
2703
|
+
s1 = peg$c66(s2);
|
2367
2704
|
if (s1 === null) {
|
2368
2705
|
peg$currPos = s0;
|
2369
2706
|
s0 = s1;
|
@@ -2388,7 +2725,7 @@ Emblem.Parser = (function() {
|
|
2388
2725
|
peg$silentFails--;
|
2389
2726
|
if (s0 === null) {
|
2390
2727
|
s1 = null;
|
2391
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2728
|
+
if (peg$silentFails === 0) { peg$fail(peg$c56); }
|
2392
2729
|
}
|
2393
2730
|
|
2394
2731
|
return s0;
|
@@ -2403,11 +2740,11 @@ Emblem.Parser = (function() {
|
|
2403
2740
|
s2 = peg$parsenmchar();
|
2404
2741
|
if (s2 === null) {
|
2405
2742
|
if (input.charCodeAt(peg$currPos) === 58) {
|
2406
|
-
s2 = peg$
|
2743
|
+
s2 = peg$c68;
|
2407
2744
|
peg$currPos++;
|
2408
2745
|
} else {
|
2409
2746
|
s2 = null;
|
2410
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2747
|
+
if (peg$silentFails === 0) { peg$fail(peg$c69); }
|
2411
2748
|
}
|
2412
2749
|
}
|
2413
2750
|
while (s2 !== null) {
|
@@ -2415,11 +2752,11 @@ Emblem.Parser = (function() {
|
|
2415
2752
|
s2 = peg$parsenmchar();
|
2416
2753
|
if (s2 === null) {
|
2417
2754
|
if (input.charCodeAt(peg$currPos) === 58) {
|
2418
|
-
s2 = peg$
|
2755
|
+
s2 = peg$c68;
|
2419
2756
|
peg$currPos++;
|
2420
2757
|
} else {
|
2421
2758
|
s2 = null;
|
2422
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2759
|
+
if (peg$silentFails === 0) { peg$fail(peg$c69); }
|
2423
2760
|
}
|
2424
2761
|
}
|
2425
2762
|
}
|
@@ -2430,7 +2767,7 @@ Emblem.Parser = (function() {
|
|
2430
2767
|
peg$silentFails--;
|
2431
2768
|
if (s0 === null) {
|
2432
2769
|
s1 = null;
|
2433
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
2770
|
+
if (peg$silentFails === 0) { peg$fail(peg$c67); }
|
2434
2771
|
}
|
2435
2772
|
|
2436
2773
|
return s0;
|
@@ -2471,7 +2808,7 @@ Emblem.Parser = (function() {
|
|
2471
2808
|
}
|
2472
2809
|
if (s2 !== null) {
|
2473
2810
|
peg$reportedPos = s0;
|
2474
|
-
s1 = peg$
|
2811
|
+
s1 = peg$c70(s2);
|
2475
2812
|
if (s1 === null) {
|
2476
2813
|
peg$currPos = s0;
|
2477
2814
|
s0 = s1;
|
@@ -2490,6 +2827,82 @@ Emblem.Parser = (function() {
|
|
2490
2827
|
return s0;
|
2491
2828
|
}
|
2492
2829
|
|
2830
|
+
function peg$parsebracketedHashSegment() {
|
2831
|
+
var s0, s1, s2, s3, s4, s5, s6;
|
2832
|
+
|
2833
|
+
s0 = peg$currPos;
|
2834
|
+
s1 = [];
|
2835
|
+
s2 = peg$parseINDENT();
|
2836
|
+
while (s2 !== null) {
|
2837
|
+
s1.push(s2);
|
2838
|
+
s2 = peg$parseINDENT();
|
2839
|
+
}
|
2840
|
+
if (s1 !== null) {
|
2841
|
+
s2 = peg$parse_();
|
2842
|
+
if (s2 !== null) {
|
2843
|
+
s3 = peg$currPos;
|
2844
|
+
s4 = peg$parsekey();
|
2845
|
+
if (s4 !== null) {
|
2846
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
2847
|
+
s5 = peg$c4;
|
2848
|
+
peg$currPos++;
|
2849
|
+
} else {
|
2850
|
+
s5 = null;
|
2851
|
+
if (peg$silentFails === 0) { peg$fail(peg$c5); }
|
2852
|
+
}
|
2853
|
+
if (s5 !== null) {
|
2854
|
+
s6 = peg$parseparam();
|
2855
|
+
if (s6 !== null) {
|
2856
|
+
s4 = [s4, s5, s6];
|
2857
|
+
s3 = s4;
|
2858
|
+
} else {
|
2859
|
+
peg$currPos = s3;
|
2860
|
+
s3 = peg$c0;
|
2861
|
+
}
|
2862
|
+
} else {
|
2863
|
+
peg$currPos = s3;
|
2864
|
+
s3 = peg$c0;
|
2865
|
+
}
|
2866
|
+
} else {
|
2867
|
+
peg$currPos = s3;
|
2868
|
+
s3 = peg$c0;
|
2869
|
+
}
|
2870
|
+
if (s3 !== null) {
|
2871
|
+
s4 = [];
|
2872
|
+
s5 = peg$parseTERM();
|
2873
|
+
while (s5 !== null) {
|
2874
|
+
s4.push(s5);
|
2875
|
+
s5 = peg$parseTERM();
|
2876
|
+
}
|
2877
|
+
if (s4 !== null) {
|
2878
|
+
peg$reportedPos = s0;
|
2879
|
+
s1 = peg$c71(s3);
|
2880
|
+
if (s1 === null) {
|
2881
|
+
peg$currPos = s0;
|
2882
|
+
s0 = s1;
|
2883
|
+
} else {
|
2884
|
+
s0 = s1;
|
2885
|
+
}
|
2886
|
+
} else {
|
2887
|
+
peg$currPos = s0;
|
2888
|
+
s0 = peg$c0;
|
2889
|
+
}
|
2890
|
+
} else {
|
2891
|
+
peg$currPos = s0;
|
2892
|
+
s0 = peg$c0;
|
2893
|
+
}
|
2894
|
+
} else {
|
2895
|
+
peg$currPos = s0;
|
2896
|
+
s0 = peg$c0;
|
2897
|
+
}
|
2898
|
+
} else {
|
2899
|
+
peg$currPos = s0;
|
2900
|
+
s0 = peg$c0;
|
2901
|
+
}
|
2902
|
+
|
2903
|
+
return s0;
|
2904
|
+
}
|
2905
|
+
|
2493
2906
|
function peg$parseparam() {
|
2494
2907
|
var s0, s1, s2, s3;
|
2495
2908
|
|
@@ -2509,7 +2922,7 @@ Emblem.Parser = (function() {
|
|
2509
2922
|
s3 = peg$parsesexprClose();
|
2510
2923
|
if (s3 !== null) {
|
2511
2924
|
peg$reportedPos = s0;
|
2512
|
-
s1 = peg$
|
2925
|
+
s1 = peg$c72(s2);
|
2513
2926
|
if (s1 === null) {
|
2514
2927
|
peg$currPos = s0;
|
2515
2928
|
s0 = s1;
|
@@ -2549,7 +2962,7 @@ Emblem.Parser = (function() {
|
|
2549
2962
|
s5 = peg$parsepathIdent();
|
2550
2963
|
if (s5 !== null) {
|
2551
2964
|
peg$reportedPos = s3;
|
2552
|
-
s4 = peg$
|
2965
|
+
s4 = peg$c73(s4, s5);
|
2553
2966
|
if (s4 === null) {
|
2554
2967
|
peg$currPos = s3;
|
2555
2968
|
s3 = s4;
|
@@ -2572,7 +2985,7 @@ Emblem.Parser = (function() {
|
|
2572
2985
|
s5 = peg$parsepathIdent();
|
2573
2986
|
if (s5 !== null) {
|
2574
2987
|
peg$reportedPos = s3;
|
2575
|
-
s4 = peg$
|
2988
|
+
s4 = peg$c73(s4, s5);
|
2576
2989
|
if (s4 === null) {
|
2577
2990
|
peg$currPos = s3;
|
2578
2991
|
s3 = s4;
|
@@ -2590,7 +3003,7 @@ Emblem.Parser = (function() {
|
|
2590
3003
|
}
|
2591
3004
|
if (s2 !== null) {
|
2592
3005
|
peg$reportedPos = s0;
|
2593
|
-
s1 = peg$
|
3006
|
+
s1 = peg$c74(s1, s2);
|
2594
3007
|
if (s1 === null) {
|
2595
3008
|
peg$currPos = s0;
|
2596
3009
|
s0 = s1;
|
@@ -2613,17 +3026,17 @@ Emblem.Parser = (function() {
|
|
2613
3026
|
var s0, s1;
|
2614
3027
|
|
2615
3028
|
peg$silentFails++;
|
2616
|
-
if (peg$
|
3029
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
2617
3030
|
s0 = input.charAt(peg$currPos);
|
2618
3031
|
peg$currPos++;
|
2619
3032
|
} else {
|
2620
3033
|
s0 = null;
|
2621
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3034
|
+
if (peg$silentFails === 0) { peg$fail(peg$c77); }
|
2622
3035
|
}
|
2623
3036
|
peg$silentFails--;
|
2624
3037
|
if (s0 === null) {
|
2625
3038
|
s1 = null;
|
2626
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3039
|
+
if (peg$silentFails === 0) { peg$fail(peg$c75); }
|
2627
3040
|
}
|
2628
3041
|
|
2629
3042
|
return s0;
|
@@ -2636,7 +3049,7 @@ Emblem.Parser = (function() {
|
|
2636
3049
|
s1 = peg$parsepath();
|
2637
3050
|
if (s1 !== null) {
|
2638
3051
|
peg$reportedPos = s0;
|
2639
|
-
s1 = peg$
|
3052
|
+
s1 = peg$c78(s1);
|
2640
3053
|
}
|
2641
3054
|
if (s1 === null) {
|
2642
3055
|
peg$currPos = s0;
|
@@ -2655,7 +3068,7 @@ Emblem.Parser = (function() {
|
|
2655
3068
|
s1 = peg$parsestring();
|
2656
3069
|
if (s1 !== null) {
|
2657
3070
|
peg$reportedPos = s0;
|
2658
|
-
s1 = peg$
|
3071
|
+
s1 = peg$c79(s1);
|
2659
3072
|
}
|
2660
3073
|
if (s1 === null) {
|
2661
3074
|
peg$currPos = s0;
|
@@ -2674,7 +3087,7 @@ Emblem.Parser = (function() {
|
|
2674
3087
|
s1 = peg$parseinteger();
|
2675
3088
|
if (s1 !== null) {
|
2676
3089
|
peg$reportedPos = s0;
|
2677
|
-
s1 = peg$
|
3090
|
+
s1 = peg$c80(s1);
|
2678
3091
|
}
|
2679
3092
|
if (s1 === null) {
|
2680
3093
|
peg$currPos = s0;
|
@@ -2693,7 +3106,7 @@ Emblem.Parser = (function() {
|
|
2693
3106
|
s1 = peg$parseboolean();
|
2694
3107
|
if (s1 !== null) {
|
2695
3108
|
peg$reportedPos = s0;
|
2696
|
-
s1 = peg$
|
3109
|
+
s1 = peg$c81(s1);
|
2697
3110
|
}
|
2698
3111
|
if (s1 === null) {
|
2699
3112
|
peg$currPos = s0;
|
@@ -2709,26 +3122,26 @@ Emblem.Parser = (function() {
|
|
2709
3122
|
var s0, s1;
|
2710
3123
|
|
2711
3124
|
peg$silentFails++;
|
2712
|
-
if (input.substr(peg$currPos, 4) === peg$
|
2713
|
-
s0 = peg$
|
3125
|
+
if (input.substr(peg$currPos, 4) === peg$c83) {
|
3126
|
+
s0 = peg$c83;
|
2714
3127
|
peg$currPos += 4;
|
2715
3128
|
} else {
|
2716
3129
|
s0 = null;
|
2717
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3130
|
+
if (peg$silentFails === 0) { peg$fail(peg$c84); }
|
2718
3131
|
}
|
2719
3132
|
if (s0 === null) {
|
2720
|
-
if (input.substr(peg$currPos, 5) === peg$
|
2721
|
-
s0 = peg$
|
3133
|
+
if (input.substr(peg$currPos, 5) === peg$c85) {
|
3134
|
+
s0 = peg$c85;
|
2722
3135
|
peg$currPos += 5;
|
2723
3136
|
} else {
|
2724
3137
|
s0 = null;
|
2725
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3138
|
+
if (peg$silentFails === 0) { peg$fail(peg$c86); }
|
2726
3139
|
}
|
2727
3140
|
}
|
2728
3141
|
peg$silentFails--;
|
2729
3142
|
if (s0 === null) {
|
2730
3143
|
s1 = null;
|
2731
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3144
|
+
if (peg$silentFails === 0) { peg$fail(peg$c82); }
|
2732
3145
|
}
|
2733
3146
|
|
2734
3147
|
return s0;
|
@@ -2742,33 +3155,33 @@ Emblem.Parser = (function() {
|
|
2742
3155
|
s1 = peg$currPos;
|
2743
3156
|
s2 = peg$currPos;
|
2744
3157
|
if (input.charCodeAt(peg$currPos) === 45) {
|
2745
|
-
s3 = peg$
|
3158
|
+
s3 = peg$c88;
|
2746
3159
|
peg$currPos++;
|
2747
3160
|
} else {
|
2748
3161
|
s3 = null;
|
2749
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3162
|
+
if (peg$silentFails === 0) { peg$fail(peg$c89); }
|
2750
3163
|
}
|
2751
3164
|
if (s3 === null) {
|
2752
3165
|
s3 = peg$c1;
|
2753
3166
|
}
|
2754
3167
|
if (s3 !== null) {
|
2755
3168
|
s4 = [];
|
2756
|
-
if (peg$
|
3169
|
+
if (peg$c90.test(input.charAt(peg$currPos))) {
|
2757
3170
|
s5 = input.charAt(peg$currPos);
|
2758
3171
|
peg$currPos++;
|
2759
3172
|
} else {
|
2760
3173
|
s5 = null;
|
2761
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3174
|
+
if (peg$silentFails === 0) { peg$fail(peg$c91); }
|
2762
3175
|
}
|
2763
3176
|
if (s5 !== null) {
|
2764
3177
|
while (s5 !== null) {
|
2765
3178
|
s4.push(s5);
|
2766
|
-
if (peg$
|
3179
|
+
if (peg$c90.test(input.charAt(peg$currPos))) {
|
2767
3180
|
s5 = input.charAt(peg$currPos);
|
2768
3181
|
peg$currPos++;
|
2769
3182
|
} else {
|
2770
3183
|
s5 = null;
|
2771
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3184
|
+
if (peg$silentFails === 0) { peg$fail(peg$c91); }
|
2772
3185
|
}
|
2773
3186
|
}
|
2774
3187
|
} else {
|
@@ -2791,7 +3204,7 @@ Emblem.Parser = (function() {
|
|
2791
3204
|
s1 = s2;
|
2792
3205
|
if (s1 !== null) {
|
2793
3206
|
peg$reportedPos = s0;
|
2794
|
-
s1 = peg$
|
3207
|
+
s1 = peg$c92(s1);
|
2795
3208
|
}
|
2796
3209
|
if (s1 === null) {
|
2797
3210
|
peg$currPos = s0;
|
@@ -2802,7 +3215,7 @@ Emblem.Parser = (function() {
|
|
2802
3215
|
peg$silentFails--;
|
2803
3216
|
if (s0 === null) {
|
2804
3217
|
s1 = null;
|
2805
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3218
|
+
if (peg$silentFails === 0) { peg$fail(peg$c87); }
|
2806
3219
|
}
|
2807
3220
|
|
2808
3221
|
return s0;
|
@@ -2814,21 +3227,21 @@ Emblem.Parser = (function() {
|
|
2814
3227
|
s0 = peg$currPos;
|
2815
3228
|
s1 = peg$currPos;
|
2816
3229
|
if (input.charCodeAt(peg$currPos) === 34) {
|
2817
|
-
s2 = peg$
|
3230
|
+
s2 = peg$c93;
|
2818
3231
|
peg$currPos++;
|
2819
3232
|
} else {
|
2820
3233
|
s2 = null;
|
2821
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3234
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
2822
3235
|
}
|
2823
3236
|
if (s2 !== null) {
|
2824
3237
|
s3 = peg$parsehashDoubleQuoteStringValue();
|
2825
3238
|
if (s3 !== null) {
|
2826
3239
|
if (input.charCodeAt(peg$currPos) === 34) {
|
2827
|
-
s4 = peg$
|
3240
|
+
s4 = peg$c93;
|
2828
3241
|
peg$currPos++;
|
2829
3242
|
} else {
|
2830
3243
|
s4 = null;
|
2831
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3244
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
2832
3245
|
}
|
2833
3246
|
if (s4 !== null) {
|
2834
3247
|
s2 = [s2, s3, s4];
|
@@ -2848,21 +3261,21 @@ Emblem.Parser = (function() {
|
|
2848
3261
|
if (s1 === null) {
|
2849
3262
|
s1 = peg$currPos;
|
2850
3263
|
if (input.charCodeAt(peg$currPos) === 39) {
|
2851
|
-
s2 = peg$
|
3264
|
+
s2 = peg$c95;
|
2852
3265
|
peg$currPos++;
|
2853
3266
|
} else {
|
2854
3267
|
s2 = null;
|
2855
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3268
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
2856
3269
|
}
|
2857
3270
|
if (s2 !== null) {
|
2858
3271
|
s3 = peg$parsehashSingleQuoteStringValue();
|
2859
3272
|
if (s3 !== null) {
|
2860
3273
|
if (input.charCodeAt(peg$currPos) === 39) {
|
2861
|
-
s4 = peg$
|
3274
|
+
s4 = peg$c95;
|
2862
3275
|
peg$currPos++;
|
2863
3276
|
} else {
|
2864
3277
|
s4 = null;
|
2865
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3278
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
2866
3279
|
}
|
2867
3280
|
if (s4 !== null) {
|
2868
3281
|
s2 = [s2, s3, s4];
|
@@ -2882,7 +3295,7 @@ Emblem.Parser = (function() {
|
|
2882
3295
|
}
|
2883
3296
|
if (s1 !== null) {
|
2884
3297
|
peg$reportedPos = s0;
|
2885
|
-
s1 = peg$
|
3298
|
+
s1 = peg$c97(s1);
|
2886
3299
|
}
|
2887
3300
|
if (s1 === null) {
|
2888
3301
|
peg$currPos = s0;
|
@@ -2911,12 +3324,12 @@ Emblem.Parser = (function() {
|
|
2911
3324
|
s3 = peg$c0;
|
2912
3325
|
}
|
2913
3326
|
if (s3 !== null) {
|
2914
|
-
if (peg$
|
3327
|
+
if (peg$c98.test(input.charAt(peg$currPos))) {
|
2915
3328
|
s4 = input.charAt(peg$currPos);
|
2916
3329
|
peg$currPos++;
|
2917
3330
|
} else {
|
2918
3331
|
s4 = null;
|
2919
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3332
|
+
if (peg$silentFails === 0) { peg$fail(peg$c99); }
|
2920
3333
|
}
|
2921
3334
|
if (s4 !== null) {
|
2922
3335
|
s3 = [s3, s4];
|
@@ -2943,12 +3356,12 @@ Emblem.Parser = (function() {
|
|
2943
3356
|
s3 = peg$c0;
|
2944
3357
|
}
|
2945
3358
|
if (s3 !== null) {
|
2946
|
-
if (peg$
|
3359
|
+
if (peg$c98.test(input.charAt(peg$currPos))) {
|
2947
3360
|
s4 = input.charAt(peg$currPos);
|
2948
3361
|
peg$currPos++;
|
2949
3362
|
} else {
|
2950
3363
|
s4 = null;
|
2951
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3364
|
+
if (peg$silentFails === 0) { peg$fail(peg$c99); }
|
2952
3365
|
}
|
2953
3366
|
if (s4 !== null) {
|
2954
3367
|
s3 = [s3, s4];
|
@@ -2987,12 +3400,12 @@ Emblem.Parser = (function() {
|
|
2987
3400
|
s3 = peg$c0;
|
2988
3401
|
}
|
2989
3402
|
if (s3 !== null) {
|
2990
|
-
if (peg$
|
3403
|
+
if (peg$c100.test(input.charAt(peg$currPos))) {
|
2991
3404
|
s4 = input.charAt(peg$currPos);
|
2992
3405
|
peg$currPos++;
|
2993
3406
|
} else {
|
2994
3407
|
s4 = null;
|
2995
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3408
|
+
if (peg$silentFails === 0) { peg$fail(peg$c101); }
|
2996
3409
|
}
|
2997
3410
|
if (s4 !== null) {
|
2998
3411
|
s3 = [s3, s4];
|
@@ -3019,12 +3432,12 @@ Emblem.Parser = (function() {
|
|
3019
3432
|
s3 = peg$c0;
|
3020
3433
|
}
|
3021
3434
|
if (s3 !== null) {
|
3022
|
-
if (peg$
|
3435
|
+
if (peg$c100.test(input.charAt(peg$currPos))) {
|
3023
3436
|
s4 = input.charAt(peg$currPos);
|
3024
3437
|
peg$currPos++;
|
3025
3438
|
} else {
|
3026
3439
|
s4 = null;
|
3027
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3440
|
+
if (peg$silentFails === 0) { peg$fail(peg$c101); }
|
3028
3441
|
}
|
3029
3442
|
if (s4 !== null) {
|
3030
3443
|
s3 = [s3, s4];
|
@@ -3049,12 +3462,12 @@ Emblem.Parser = (function() {
|
|
3049
3462
|
function peg$parsealpha() {
|
3050
3463
|
var s0;
|
3051
3464
|
|
3052
|
-
if (peg$
|
3465
|
+
if (peg$c102.test(input.charAt(peg$currPos))) {
|
3053
3466
|
s0 = input.charAt(peg$currPos);
|
3054
3467
|
peg$currPos++;
|
3055
3468
|
} else {
|
3056
3469
|
s0 = null;
|
3057
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3470
|
+
if (peg$silentFails === 0) { peg$fail(peg$c103); }
|
3058
3471
|
}
|
3059
3472
|
|
3060
3473
|
return s0;
|
@@ -3078,7 +3491,7 @@ Emblem.Parser = (function() {
|
|
3078
3491
|
s4 = peg$parseanyDedent();
|
3079
3492
|
if (s4 !== null) {
|
3080
3493
|
peg$reportedPos = s0;
|
3081
|
-
s1 = peg$
|
3494
|
+
s1 = peg$c104(s1, s2, s3);
|
3082
3495
|
if (s1 === null) {
|
3083
3496
|
peg$currPos = s0;
|
3084
3497
|
s0 = s1;
|
@@ -3112,12 +3525,12 @@ Emblem.Parser = (function() {
|
|
3112
3525
|
var s0, s1, s2;
|
3113
3526
|
|
3114
3527
|
s0 = peg$currPos;
|
3115
|
-
if (peg$
|
3528
|
+
if (peg$c105.test(input.charAt(peg$currPos))) {
|
3116
3529
|
s1 = input.charAt(peg$currPos);
|
3117
3530
|
peg$currPos++;
|
3118
3531
|
} else {
|
3119
3532
|
s1 = null;
|
3120
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3533
|
+
if (peg$silentFails === 0) { peg$fail(peg$c106); }
|
3121
3534
|
}
|
3122
3535
|
if (s1 !== null) {
|
3123
3536
|
if (input.charCodeAt(peg$currPos) === 32) {
|
@@ -3132,7 +3545,7 @@ Emblem.Parser = (function() {
|
|
3132
3545
|
}
|
3133
3546
|
if (s2 !== null) {
|
3134
3547
|
peg$reportedPos = s0;
|
3135
|
-
s1 = peg$
|
3548
|
+
s1 = peg$c63(s1);
|
3136
3549
|
if (s1 === null) {
|
3137
3550
|
peg$currPos = s0;
|
3138
3551
|
s0 = s1;
|
@@ -3152,11 +3565,11 @@ Emblem.Parser = (function() {
|
|
3152
3565
|
s1 = peg$currPos;
|
3153
3566
|
peg$silentFails++;
|
3154
3567
|
if (input.charCodeAt(peg$currPos) === 60) {
|
3155
|
-
s2 = peg$
|
3568
|
+
s2 = peg$c107;
|
3156
3569
|
peg$currPos++;
|
3157
3570
|
} else {
|
3158
3571
|
s2 = null;
|
3159
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3572
|
+
if (peg$silentFails === 0) { peg$fail(peg$c108); }
|
3160
3573
|
}
|
3161
3574
|
peg$silentFails--;
|
3162
3575
|
if (s2 !== null) {
|
@@ -3167,7 +3580,7 @@ Emblem.Parser = (function() {
|
|
3167
3580
|
}
|
3168
3581
|
if (s1 !== null) {
|
3169
3582
|
peg$reportedPos = s0;
|
3170
|
-
s1 = peg$
|
3583
|
+
s1 = peg$c109();
|
3171
3584
|
}
|
3172
3585
|
if (s1 === null) {
|
3173
3586
|
peg$currPos = s0;
|
@@ -3219,7 +3632,7 @@ Emblem.Parser = (function() {
|
|
3219
3632
|
}
|
3220
3633
|
if (s3 !== null) {
|
3221
3634
|
peg$reportedPos = s0;
|
3222
|
-
s1 = peg$
|
3635
|
+
s1 = peg$c110(s1, s2, s3);
|
3223
3636
|
if (s1 === null) {
|
3224
3637
|
peg$currPos = s0;
|
3225
3638
|
s0 = s1;
|
@@ -3295,7 +3708,7 @@ Emblem.Parser = (function() {
|
|
3295
3708
|
s3 = peg$parseTERM();
|
3296
3709
|
if (s3 !== null) {
|
3297
3710
|
peg$reportedPos = s0;
|
3298
|
-
s1 = peg$
|
3711
|
+
s1 = peg$c111(s1, s2);
|
3299
3712
|
if (s1 === null) {
|
3300
3713
|
peg$currPos = s0;
|
3301
3714
|
s0 = s1;
|
@@ -3323,25 +3736,25 @@ Emblem.Parser = (function() {
|
|
3323
3736
|
|
3324
3737
|
s0 = peg$currPos;
|
3325
3738
|
if (input.charCodeAt(peg$currPos) === 34) {
|
3326
|
-
s1 = peg$
|
3739
|
+
s1 = peg$c93;
|
3327
3740
|
peg$currPos++;
|
3328
3741
|
} else {
|
3329
3742
|
s1 = null;
|
3330
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3743
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
3331
3744
|
}
|
3332
3745
|
if (s1 !== null) {
|
3333
3746
|
s2 = peg$parseattributeTextNodesInner();
|
3334
3747
|
if (s2 !== null) {
|
3335
3748
|
if (input.charCodeAt(peg$currPos) === 34) {
|
3336
|
-
s3 = peg$
|
3749
|
+
s3 = peg$c93;
|
3337
3750
|
peg$currPos++;
|
3338
3751
|
} else {
|
3339
3752
|
s3 = null;
|
3340
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3753
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
3341
3754
|
}
|
3342
3755
|
if (s3 !== null) {
|
3343
3756
|
peg$reportedPos = s0;
|
3344
|
-
s1 = peg$
|
3757
|
+
s1 = peg$c54(s2);
|
3345
3758
|
if (s1 === null) {
|
3346
3759
|
peg$currPos = s0;
|
3347
3760
|
s0 = s1;
|
@@ -3363,25 +3776,25 @@ Emblem.Parser = (function() {
|
|
3363
3776
|
if (s0 === null) {
|
3364
3777
|
s0 = peg$currPos;
|
3365
3778
|
if (input.charCodeAt(peg$currPos) === 39) {
|
3366
|
-
s1 = peg$
|
3779
|
+
s1 = peg$c95;
|
3367
3780
|
peg$currPos++;
|
3368
3781
|
} else {
|
3369
3782
|
s1 = null;
|
3370
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3783
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
3371
3784
|
}
|
3372
3785
|
if (s1 !== null) {
|
3373
3786
|
s2 = peg$parseattributeTextNodesInnerSingle();
|
3374
3787
|
if (s2 !== null) {
|
3375
3788
|
if (input.charCodeAt(peg$currPos) === 39) {
|
3376
|
-
s3 = peg$
|
3789
|
+
s3 = peg$c95;
|
3377
3790
|
peg$currPos++;
|
3378
3791
|
} else {
|
3379
3792
|
s3 = null;
|
3380
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3793
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
3381
3794
|
}
|
3382
3795
|
if (s3 !== null) {
|
3383
3796
|
peg$reportedPos = s0;
|
3384
|
-
s1 = peg$
|
3797
|
+
s1 = peg$c54(s2);
|
3385
3798
|
if (s1 === null) {
|
3386
3799
|
peg$currPos = s0;
|
3387
3800
|
s0 = s1;
|
@@ -3456,7 +3869,7 @@ Emblem.Parser = (function() {
|
|
3456
3869
|
}
|
3457
3870
|
if (s2 !== null) {
|
3458
3871
|
peg$reportedPos = s0;
|
3459
|
-
s1 = peg$
|
3872
|
+
s1 = peg$c112(s1, s2);
|
3460
3873
|
if (s1 === null) {
|
3461
3874
|
peg$currPos = s0;
|
3462
3875
|
s0 = s1;
|
@@ -3526,7 +3939,7 @@ Emblem.Parser = (function() {
|
|
3526
3939
|
}
|
3527
3940
|
if (s2 !== null) {
|
3528
3941
|
peg$reportedPos = s0;
|
3529
|
-
s1 = peg$
|
3942
|
+
s1 = peg$c112(s1, s2);
|
3530
3943
|
if (s1 === null) {
|
3531
3944
|
peg$currPos = s0;
|
3532
3945
|
s0 = s1;
|
@@ -3563,11 +3976,11 @@ Emblem.Parser = (function() {
|
|
3563
3976
|
s1 = peg$currPos;
|
3564
3977
|
peg$silentFails++;
|
3565
3978
|
if (input.charCodeAt(peg$currPos) === 123) {
|
3566
|
-
s2 = peg$
|
3979
|
+
s2 = peg$c113;
|
3567
3980
|
peg$currPos++;
|
3568
3981
|
} else {
|
3569
3982
|
s2 = null;
|
3570
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
3983
|
+
if (peg$silentFails === 0) { peg$fail(peg$c114); }
|
3571
3984
|
}
|
3572
3985
|
peg$silentFails--;
|
3573
3986
|
if (s2 === null) {
|
@@ -3579,21 +3992,21 @@ Emblem.Parser = (function() {
|
|
3579
3992
|
if (s1 !== null) {
|
3580
3993
|
s2 = peg$currPos;
|
3581
3994
|
s3 = [];
|
3582
|
-
if (peg$
|
3995
|
+
if (peg$c115.test(input.charAt(peg$currPos))) {
|
3583
3996
|
s4 = input.charAt(peg$currPos);
|
3584
3997
|
peg$currPos++;
|
3585
3998
|
} else {
|
3586
3999
|
s4 = null;
|
3587
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4000
|
+
if (peg$silentFails === 0) { peg$fail(peg$c116); }
|
3588
4001
|
}
|
3589
4002
|
while (s4 !== null) {
|
3590
4003
|
s3.push(s4);
|
3591
|
-
if (peg$
|
4004
|
+
if (peg$c115.test(input.charAt(peg$currPos))) {
|
3592
4005
|
s4 = input.charAt(peg$currPos);
|
3593
4006
|
peg$currPos++;
|
3594
4007
|
} else {
|
3595
4008
|
s4 = null;
|
3596
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4009
|
+
if (peg$silentFails === 0) { peg$fail(peg$c116); }
|
3597
4010
|
}
|
3598
4011
|
}
|
3599
4012
|
if (s3 !== null) {
|
@@ -3602,7 +4015,7 @@ Emblem.Parser = (function() {
|
|
3602
4015
|
s2 = s3;
|
3603
4016
|
if (s2 !== null) {
|
3604
4017
|
peg$reportedPos = s0;
|
3605
|
-
s1 = peg$
|
4018
|
+
s1 = peg$c117(s2);
|
3606
4019
|
if (s1 === null) {
|
3607
4020
|
peg$currPos = s0;
|
3608
4021
|
s0 = s1;
|
@@ -3636,7 +4049,7 @@ Emblem.Parser = (function() {
|
|
3636
4049
|
s5 = peg$parsedoubleClose();
|
3637
4050
|
if (s5 !== null) {
|
3638
4051
|
peg$reportedPos = s0;
|
3639
|
-
s1 = peg$
|
4052
|
+
s1 = peg$c118(s3);
|
3640
4053
|
if (s1 === null) {
|
3641
4054
|
peg$currPos = s0;
|
3642
4055
|
s0 = s1;
|
@@ -3676,7 +4089,7 @@ Emblem.Parser = (function() {
|
|
3676
4089
|
s5 = peg$parsehashStacheClose();
|
3677
4090
|
if (s5 !== null) {
|
3678
4091
|
peg$reportedPos = s0;
|
3679
|
-
s1 = peg$
|
4092
|
+
s1 = peg$c118(s3);
|
3680
4093
|
if (s1 === null) {
|
3681
4094
|
peg$currPos = s0;
|
3682
4095
|
s0 = s1;
|
@@ -3723,7 +4136,7 @@ Emblem.Parser = (function() {
|
|
3723
4136
|
s5 = peg$parsetripleClose();
|
3724
4137
|
if (s5 !== null) {
|
3725
4138
|
peg$reportedPos = s0;
|
3726
|
-
s1 = peg$
|
4139
|
+
s1 = peg$c119(s3);
|
3727
4140
|
if (s1 === null) {
|
3728
4141
|
peg$currPos = s0;
|
3729
4142
|
s0 = s1;
|
@@ -3775,7 +4188,7 @@ Emblem.Parser = (function() {
|
|
3775
4188
|
s1 = s2;
|
3776
4189
|
if (s1 !== null) {
|
3777
4190
|
peg$reportedPos = s0;
|
3778
|
-
s1 = peg$
|
4191
|
+
s1 = peg$c120(s1);
|
3779
4192
|
}
|
3780
4193
|
if (s1 === null) {
|
3781
4194
|
peg$currPos = s0;
|
@@ -3808,7 +4221,7 @@ Emblem.Parser = (function() {
|
|
3808
4221
|
s1 = s2;
|
3809
4222
|
if (s1 !== null) {
|
3810
4223
|
peg$reportedPos = s0;
|
3811
|
-
s1 = peg$
|
4224
|
+
s1 = peg$c120(s1);
|
3812
4225
|
}
|
3813
4226
|
if (s1 === null) {
|
3814
4227
|
peg$currPos = s0;
|
@@ -3829,11 +4242,11 @@ Emblem.Parser = (function() {
|
|
3829
4242
|
s2 = peg$parsenonMustacheUnit();
|
3830
4243
|
if (s2 === null) {
|
3831
4244
|
if (input.charCodeAt(peg$currPos) === 34) {
|
3832
|
-
s2 = peg$
|
4245
|
+
s2 = peg$c93;
|
3833
4246
|
peg$currPos++;
|
3834
4247
|
} else {
|
3835
4248
|
s2 = null;
|
3836
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4249
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
3837
4250
|
}
|
3838
4251
|
}
|
3839
4252
|
peg$silentFails--;
|
@@ -3849,7 +4262,7 @@ Emblem.Parser = (function() {
|
|
3849
4262
|
peg$currPos++;
|
3850
4263
|
} else {
|
3851
4264
|
s2 = null;
|
3852
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4265
|
+
if (peg$silentFails === 0) { peg$fail(peg$c121); }
|
3853
4266
|
}
|
3854
4267
|
if (s2 !== null) {
|
3855
4268
|
peg$reportedPos = s0;
|
@@ -3881,11 +4294,11 @@ Emblem.Parser = (function() {
|
|
3881
4294
|
s2 = peg$parsenonMustacheUnit();
|
3882
4295
|
if (s2 === null) {
|
3883
4296
|
if (input.charCodeAt(peg$currPos) === 39) {
|
3884
|
-
s2 = peg$
|
4297
|
+
s2 = peg$c95;
|
3885
4298
|
peg$currPos++;
|
3886
4299
|
} else {
|
3887
4300
|
s2 = null;
|
3888
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4301
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
3889
4302
|
}
|
3890
4303
|
}
|
3891
4304
|
peg$silentFails--;
|
@@ -3901,7 +4314,7 @@ Emblem.Parser = (function() {
|
|
3901
4314
|
peg$currPos++;
|
3902
4315
|
} else {
|
3903
4316
|
s2 = null;
|
3904
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4317
|
+
if (peg$silentFails === 0) { peg$fail(peg$c121); }
|
3905
4318
|
}
|
3906
4319
|
if (s2 !== null) {
|
3907
4320
|
peg$reportedPos = s0;
|
@@ -3945,7 +4358,7 @@ Emblem.Parser = (function() {
|
|
3945
4358
|
s1 = s2;
|
3946
4359
|
if (s1 !== null) {
|
3947
4360
|
peg$reportedPos = s0;
|
3948
|
-
s1 = peg$
|
4361
|
+
s1 = peg$c120(s1);
|
3949
4362
|
}
|
3950
4363
|
if (s1 === null) {
|
3951
4364
|
peg$currPos = s0;
|
@@ -3977,7 +4390,7 @@ Emblem.Parser = (function() {
|
|
3977
4390
|
peg$currPos++;
|
3978
4391
|
} else {
|
3979
4392
|
s2 = null;
|
3980
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4393
|
+
if (peg$silentFails === 0) { peg$fail(peg$c121); }
|
3981
4394
|
}
|
3982
4395
|
if (s2 !== null) {
|
3983
4396
|
peg$reportedPos = s0;
|
@@ -4035,7 +4448,7 @@ Emblem.Parser = (function() {
|
|
4035
4448
|
s5 = peg$parsesingleClose();
|
4036
4449
|
if (s5 !== null) {
|
4037
4450
|
peg$reportedPos = s0;
|
4038
|
-
s1 = peg$
|
4451
|
+
s1 = peg$c118(s3);
|
4039
4452
|
if (s1 === null) {
|
4040
4453
|
peg$currPos = s0;
|
4041
4454
|
s0 = s1;
|
@@ -4085,16 +4498,16 @@ Emblem.Parser = (function() {
|
|
4085
4498
|
|
4086
4499
|
peg$silentFails++;
|
4087
4500
|
if (input.charCodeAt(peg$currPos) === 123) {
|
4088
|
-
s0 = peg$
|
4501
|
+
s0 = peg$c113;
|
4089
4502
|
peg$currPos++;
|
4090
4503
|
} else {
|
4091
4504
|
s0 = null;
|
4092
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4505
|
+
if (peg$silentFails === 0) { peg$fail(peg$c114); }
|
4093
4506
|
}
|
4094
4507
|
peg$silentFails--;
|
4095
4508
|
if (s0 === null) {
|
4096
4509
|
s1 = null;
|
4097
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4510
|
+
if (peg$silentFails === 0) { peg$fail(peg$c122); }
|
4098
4511
|
}
|
4099
4512
|
|
4100
4513
|
return s0;
|
@@ -4104,17 +4517,17 @@ Emblem.Parser = (function() {
|
|
4104
4517
|
var s0, s1;
|
4105
4518
|
|
4106
4519
|
peg$silentFails++;
|
4107
|
-
if (input.substr(peg$currPos, 2) === peg$
|
4108
|
-
s0 = peg$
|
4520
|
+
if (input.substr(peg$currPos, 2) === peg$c124) {
|
4521
|
+
s0 = peg$c124;
|
4109
4522
|
peg$currPos += 2;
|
4110
4523
|
} else {
|
4111
4524
|
s0 = null;
|
4112
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4525
|
+
if (peg$silentFails === 0) { peg$fail(peg$c125); }
|
4113
4526
|
}
|
4114
4527
|
peg$silentFails--;
|
4115
4528
|
if (s0 === null) {
|
4116
4529
|
s1 = null;
|
4117
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4530
|
+
if (peg$silentFails === 0) { peg$fail(peg$c123); }
|
4118
4531
|
}
|
4119
4532
|
|
4120
4533
|
return s0;
|
@@ -4124,17 +4537,17 @@ Emblem.Parser = (function() {
|
|
4124
4537
|
var s0, s1;
|
4125
4538
|
|
4126
4539
|
peg$silentFails++;
|
4127
|
-
if (input.substr(peg$currPos, 3) === peg$
|
4128
|
-
s0 = peg$
|
4540
|
+
if (input.substr(peg$currPos, 3) === peg$c127) {
|
4541
|
+
s0 = peg$c127;
|
4129
4542
|
peg$currPos += 3;
|
4130
4543
|
} else {
|
4131
4544
|
s0 = null;
|
4132
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4545
|
+
if (peg$silentFails === 0) { peg$fail(peg$c128); }
|
4133
4546
|
}
|
4134
4547
|
peg$silentFails--;
|
4135
4548
|
if (s0 === null) {
|
4136
4549
|
s1 = null;
|
4137
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4550
|
+
if (peg$silentFails === 0) { peg$fail(peg$c126); }
|
4138
4551
|
}
|
4139
4552
|
|
4140
4553
|
return s0;
|
@@ -4145,16 +4558,16 @@ Emblem.Parser = (function() {
|
|
4145
4558
|
|
4146
4559
|
peg$silentFails++;
|
4147
4560
|
if (input.charCodeAt(peg$currPos) === 125) {
|
4148
|
-
s0 = peg$
|
4561
|
+
s0 = peg$c130;
|
4149
4562
|
peg$currPos++;
|
4150
4563
|
} else {
|
4151
4564
|
s0 = null;
|
4152
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4565
|
+
if (peg$silentFails === 0) { peg$fail(peg$c131); }
|
4153
4566
|
}
|
4154
4567
|
peg$silentFails--;
|
4155
4568
|
if (s0 === null) {
|
4156
4569
|
s1 = null;
|
4157
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4570
|
+
if (peg$silentFails === 0) { peg$fail(peg$c129); }
|
4158
4571
|
}
|
4159
4572
|
|
4160
4573
|
return s0;
|
@@ -4164,17 +4577,17 @@ Emblem.Parser = (function() {
|
|
4164
4577
|
var s0, s1;
|
4165
4578
|
|
4166
4579
|
peg$silentFails++;
|
4167
|
-
if (input.substr(peg$currPos, 2) === peg$
|
4168
|
-
s0 = peg$
|
4580
|
+
if (input.substr(peg$currPos, 2) === peg$c133) {
|
4581
|
+
s0 = peg$c133;
|
4169
4582
|
peg$currPos += 2;
|
4170
4583
|
} else {
|
4171
4584
|
s0 = null;
|
4172
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4585
|
+
if (peg$silentFails === 0) { peg$fail(peg$c134); }
|
4173
4586
|
}
|
4174
4587
|
peg$silentFails--;
|
4175
4588
|
if (s0 === null) {
|
4176
4589
|
s1 = null;
|
4177
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4590
|
+
if (peg$silentFails === 0) { peg$fail(peg$c132); }
|
4178
4591
|
}
|
4179
4592
|
|
4180
4593
|
return s0;
|
@@ -4184,17 +4597,17 @@ Emblem.Parser = (function() {
|
|
4184
4597
|
var s0, s1;
|
4185
4598
|
|
4186
4599
|
peg$silentFails++;
|
4187
|
-
if (input.substr(peg$currPos, 3) === peg$
|
4188
|
-
s0 = peg$
|
4600
|
+
if (input.substr(peg$currPos, 3) === peg$c136) {
|
4601
|
+
s0 = peg$c136;
|
4189
4602
|
peg$currPos += 3;
|
4190
4603
|
} else {
|
4191
4604
|
s0 = null;
|
4192
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4605
|
+
if (peg$silentFails === 0) { peg$fail(peg$c137); }
|
4193
4606
|
}
|
4194
4607
|
peg$silentFails--;
|
4195
4608
|
if (s0 === null) {
|
4196
4609
|
s1 = null;
|
4197
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4610
|
+
if (peg$silentFails === 0) { peg$fail(peg$c135); }
|
4198
4611
|
}
|
4199
4612
|
|
4200
4613
|
return s0;
|
@@ -4205,16 +4618,16 @@ Emblem.Parser = (function() {
|
|
4205
4618
|
|
4206
4619
|
peg$silentFails++;
|
4207
4620
|
if (input.charCodeAt(peg$currPos) === 40) {
|
4208
|
-
s0 = peg$
|
4621
|
+
s0 = peg$c139;
|
4209
4622
|
peg$currPos++;
|
4210
4623
|
} else {
|
4211
4624
|
s0 = null;
|
4212
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4625
|
+
if (peg$silentFails === 0) { peg$fail(peg$c140); }
|
4213
4626
|
}
|
4214
4627
|
peg$silentFails--;
|
4215
4628
|
if (s0 === null) {
|
4216
4629
|
s1 = null;
|
4217
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4630
|
+
if (peg$silentFails === 0) { peg$fail(peg$c138); }
|
4218
4631
|
}
|
4219
4632
|
|
4220
4633
|
return s0;
|
@@ -4225,16 +4638,16 @@ Emblem.Parser = (function() {
|
|
4225
4638
|
|
4226
4639
|
peg$silentFails++;
|
4227
4640
|
if (input.charCodeAt(peg$currPos) === 41) {
|
4228
|
-
s0 = peg$
|
4641
|
+
s0 = peg$c142;
|
4229
4642
|
peg$currPos++;
|
4230
4643
|
} else {
|
4231
4644
|
s0 = null;
|
4232
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4645
|
+
if (peg$silentFails === 0) { peg$fail(peg$c143); }
|
4233
4646
|
}
|
4234
4647
|
peg$silentFails--;
|
4235
4648
|
if (s0 === null) {
|
4236
4649
|
s1 = null;
|
4237
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4650
|
+
if (peg$silentFails === 0) { peg$fail(peg$c141); }
|
4238
4651
|
}
|
4239
4652
|
|
4240
4653
|
return s0;
|
@@ -4244,17 +4657,17 @@ Emblem.Parser = (function() {
|
|
4244
4657
|
var s0, s1;
|
4245
4658
|
|
4246
4659
|
peg$silentFails++;
|
4247
|
-
if (input.substr(peg$currPos, 2) === peg$
|
4248
|
-
s0 = peg$
|
4660
|
+
if (input.substr(peg$currPos, 2) === peg$c145) {
|
4661
|
+
s0 = peg$c145;
|
4249
4662
|
peg$currPos += 2;
|
4250
4663
|
} else {
|
4251
4664
|
s0 = null;
|
4252
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4665
|
+
if (peg$silentFails === 0) { peg$fail(peg$c146); }
|
4253
4666
|
}
|
4254
4667
|
peg$silentFails--;
|
4255
4668
|
if (s0 === null) {
|
4256
4669
|
s1 = null;
|
4257
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4670
|
+
if (peg$silentFails === 0) { peg$fail(peg$c144); }
|
4258
4671
|
}
|
4259
4672
|
|
4260
4673
|
return s0;
|
@@ -4265,16 +4678,16 @@ Emblem.Parser = (function() {
|
|
4265
4678
|
|
4266
4679
|
peg$silentFails++;
|
4267
4680
|
if (input.charCodeAt(peg$currPos) === 125) {
|
4268
|
-
s0 = peg$
|
4681
|
+
s0 = peg$c130;
|
4269
4682
|
peg$currPos++;
|
4270
4683
|
} else {
|
4271
4684
|
s0 = null;
|
4272
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4685
|
+
if (peg$silentFails === 0) { peg$fail(peg$c131); }
|
4273
4686
|
}
|
4274
4687
|
peg$silentFails--;
|
4275
4688
|
if (s0 === null) {
|
4276
4689
|
s1 = null;
|
4277
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4690
|
+
if (peg$silentFails === 0) { peg$fail(peg$c147); }
|
4278
4691
|
}
|
4279
4692
|
|
4280
4693
|
return s0;
|
@@ -4284,12 +4697,12 @@ Emblem.Parser = (function() {
|
|
4284
4697
|
var s0, s1, s2;
|
4285
4698
|
|
4286
4699
|
s0 = peg$currPos;
|
4287
|
-
if (input.substr(peg$currPos, 2) === peg$
|
4288
|
-
s1 = peg$
|
4700
|
+
if (input.substr(peg$currPos, 2) === peg$c148) {
|
4701
|
+
s1 = peg$c148;
|
4289
4702
|
peg$currPos += 2;
|
4290
4703
|
} else {
|
4291
4704
|
s1 = null;
|
4292
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
4705
|
+
if (peg$silentFails === 0) { peg$fail(peg$c149); }
|
4293
4706
|
}
|
4294
4707
|
if (s1 !== null) {
|
4295
4708
|
if (input.charCodeAt(peg$currPos) === 32) {
|
@@ -4304,7 +4717,7 @@ Emblem.Parser = (function() {
|
|
4304
4717
|
}
|
4305
4718
|
if (s2 !== null) {
|
4306
4719
|
peg$reportedPos = s0;
|
4307
|
-
s1 = peg$
|
4720
|
+
s1 = peg$c150();
|
4308
4721
|
if (s1 === null) {
|
4309
4722
|
peg$currPos = s0;
|
4310
4723
|
s0 = s1;
|
@@ -4341,7 +4754,7 @@ Emblem.Parser = (function() {
|
|
4341
4754
|
}
|
4342
4755
|
if (s2 !== null) {
|
4343
4756
|
peg$reportedPos = s0;
|
4344
|
-
s1 = peg$
|
4757
|
+
s1 = peg$c151();
|
4345
4758
|
if (s1 === null) {
|
4346
4759
|
peg$currPos = s0;
|
4347
4760
|
s0 = s1;
|
@@ -4387,7 +4800,7 @@ Emblem.Parser = (function() {
|
|
4387
4800
|
}
|
4388
4801
|
if (s3 !== null) {
|
4389
4802
|
peg$reportedPos = peg$currPos;
|
4390
|
-
s4 = peg$
|
4803
|
+
s4 = peg$c152(s1, s2);
|
4391
4804
|
if (s4) {
|
4392
4805
|
s4 = peg$c1;
|
4393
4806
|
} else {
|
@@ -4417,32 +4830,53 @@ Emblem.Parser = (function() {
|
|
4417
4830
|
}
|
4418
4831
|
|
4419
4832
|
function peg$parseinHtmlTag() {
|
4420
|
-
var s0, s1, s2, s3, s4;
|
4833
|
+
var s0, s1, s2, s3, s4, s5, s6;
|
4421
4834
|
|
4422
4835
|
s0 = peg$currPos;
|
4423
4836
|
s1 = peg$parsehtmlStart();
|
4424
4837
|
if (s1 !== null) {
|
4425
|
-
s2 =
|
4426
|
-
|
4427
|
-
|
4428
|
-
|
4429
|
-
|
4838
|
+
s2 = peg$currPos;
|
4839
|
+
peg$silentFails++;
|
4840
|
+
if (input.substr(peg$currPos, 2) === peg$c44) {
|
4841
|
+
s3 = peg$c44;
|
4842
|
+
peg$currPos += 2;
|
4843
|
+
} else {
|
4844
|
+
s3 = null;
|
4845
|
+
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
4846
|
+
}
|
4847
|
+
peg$silentFails--;
|
4848
|
+
if (s3 === null) {
|
4849
|
+
s2 = peg$c1;
|
4850
|
+
} else {
|
4851
|
+
peg$currPos = s2;
|
4852
|
+
s2 = peg$c0;
|
4430
4853
|
}
|
4431
4854
|
if (s2 !== null) {
|
4432
4855
|
s3 = [];
|
4433
|
-
s4 = peg$
|
4856
|
+
s4 = peg$parseinTagMustache();
|
4434
4857
|
while (s4 !== null) {
|
4435
4858
|
s3.push(s4);
|
4436
|
-
s4 = peg$
|
4859
|
+
s4 = peg$parseinTagMustache();
|
4437
4860
|
}
|
4438
4861
|
if (s3 !== null) {
|
4439
|
-
|
4440
|
-
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4862
|
+
s4 = [];
|
4863
|
+
s5 = peg$parsefullAttribute();
|
4864
|
+
while (s5 !== null) {
|
4865
|
+
s4.push(s5);
|
4866
|
+
s5 = peg$parsefullAttribute();
|
4867
|
+
}
|
4868
|
+
if (s4 !== null) {
|
4869
|
+
peg$reportedPos = s0;
|
4870
|
+
s1 = peg$c153(s1, s3, s4);
|
4871
|
+
if (s1 === null) {
|
4872
|
+
peg$currPos = s0;
|
4873
|
+
s0 = s1;
|
4874
|
+
} else {
|
4875
|
+
s0 = s1;
|
4876
|
+
}
|
4444
4877
|
} else {
|
4445
|
-
|
4878
|
+
peg$currPos = s0;
|
4879
|
+
s0 = peg$c0;
|
4446
4880
|
}
|
4447
4881
|
} else {
|
4448
4882
|
peg$currPos = s0;
|
@@ -4456,6 +4890,106 @@ Emblem.Parser = (function() {
|
|
4456
4890
|
peg$currPos = s0;
|
4457
4891
|
s0 = peg$c0;
|
4458
4892
|
}
|
4893
|
+
if (s0 === null) {
|
4894
|
+
s0 = peg$currPos;
|
4895
|
+
s1 = peg$parsehtmlStart();
|
4896
|
+
if (s1 !== null) {
|
4897
|
+
s2 = [];
|
4898
|
+
s3 = peg$currPos;
|
4899
|
+
if (input.substr(peg$currPos, 2) === peg$c44) {
|
4900
|
+
s4 = peg$c44;
|
4901
|
+
peg$currPos += 2;
|
4902
|
+
} else {
|
4903
|
+
s4 = null;
|
4904
|
+
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
4905
|
+
}
|
4906
|
+
if (s4 !== null) {
|
4907
|
+
s5 = [];
|
4908
|
+
s6 = peg$parseTERM();
|
4909
|
+
while (s6 !== null) {
|
4910
|
+
s5.push(s6);
|
4911
|
+
s6 = peg$parseTERM();
|
4912
|
+
}
|
4913
|
+
if (s5 !== null) {
|
4914
|
+
s4 = [s4, s5];
|
4915
|
+
s3 = s4;
|
4916
|
+
} else {
|
4917
|
+
peg$currPos = s3;
|
4918
|
+
s3 = peg$c0;
|
4919
|
+
}
|
4920
|
+
} else {
|
4921
|
+
peg$currPos = s3;
|
4922
|
+
s3 = peg$c0;
|
4923
|
+
}
|
4924
|
+
while (s3 !== null) {
|
4925
|
+
s2.push(s3);
|
4926
|
+
s3 = peg$currPos;
|
4927
|
+
if (input.substr(peg$currPos, 2) === peg$c44) {
|
4928
|
+
s4 = peg$c44;
|
4929
|
+
peg$currPos += 2;
|
4930
|
+
} else {
|
4931
|
+
s4 = null;
|
4932
|
+
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
4933
|
+
}
|
4934
|
+
if (s4 !== null) {
|
4935
|
+
s5 = [];
|
4936
|
+
s6 = peg$parseTERM();
|
4937
|
+
while (s6 !== null) {
|
4938
|
+
s5.push(s6);
|
4939
|
+
s6 = peg$parseTERM();
|
4940
|
+
}
|
4941
|
+
if (s5 !== null) {
|
4942
|
+
s4 = [s4, s5];
|
4943
|
+
s3 = s4;
|
4944
|
+
} else {
|
4945
|
+
peg$currPos = s3;
|
4946
|
+
s3 = peg$c0;
|
4947
|
+
}
|
4948
|
+
} else {
|
4949
|
+
peg$currPos = s3;
|
4950
|
+
s3 = peg$c0;
|
4951
|
+
}
|
4952
|
+
}
|
4953
|
+
if (s2 !== null) {
|
4954
|
+
s3 = [];
|
4955
|
+
s4 = peg$parseinTagMustache();
|
4956
|
+
while (s4 !== null) {
|
4957
|
+
s3.push(s4);
|
4958
|
+
s4 = peg$parseinTagMustache();
|
4959
|
+
}
|
4960
|
+
if (s3 !== null) {
|
4961
|
+
s4 = [];
|
4962
|
+
s5 = peg$parsebracketedAttribute();
|
4963
|
+
while (s5 !== null) {
|
4964
|
+
s4.push(s5);
|
4965
|
+
s5 = peg$parsebracketedAttribute();
|
4966
|
+
}
|
4967
|
+
if (s4 !== null) {
|
4968
|
+
peg$reportedPos = s0;
|
4969
|
+
s1 = peg$c153(s1, s3, s4);
|
4970
|
+
if (s1 === null) {
|
4971
|
+
peg$currPos = s0;
|
4972
|
+
s0 = s1;
|
4973
|
+
} else {
|
4974
|
+
s0 = s1;
|
4975
|
+
}
|
4976
|
+
} else {
|
4977
|
+
peg$currPos = s0;
|
4978
|
+
s0 = peg$c0;
|
4979
|
+
}
|
4980
|
+
} else {
|
4981
|
+
peg$currPos = s0;
|
4982
|
+
s0 = peg$c0;
|
4983
|
+
}
|
4984
|
+
} else {
|
4985
|
+
peg$currPos = s0;
|
4986
|
+
s0 = peg$c0;
|
4987
|
+
}
|
4988
|
+
} else {
|
4989
|
+
peg$currPos = s0;
|
4990
|
+
s0 = peg$c0;
|
4991
|
+
}
|
4992
|
+
}
|
4459
4993
|
|
4460
4994
|
return s0;
|
4461
4995
|
}
|
@@ -4469,7 +5003,7 @@ Emblem.Parser = (function() {
|
|
4469
5003
|
s3 = peg$parseidShorthand();
|
4470
5004
|
if (s3 !== null) {
|
4471
5005
|
peg$reportedPos = s2;
|
4472
|
-
s3 = peg$
|
5006
|
+
s3 = peg$c154(s3);
|
4473
5007
|
}
|
4474
5008
|
if (s3 === null) {
|
4475
5009
|
peg$currPos = s2;
|
@@ -4482,7 +5016,7 @@ Emblem.Parser = (function() {
|
|
4482
5016
|
s3 = peg$parseclassShorthand();
|
4483
5017
|
if (s3 !== null) {
|
4484
5018
|
peg$reportedPos = s2;
|
4485
|
-
s3 = peg$
|
5019
|
+
s3 = peg$c155(s3);
|
4486
5020
|
}
|
4487
5021
|
if (s3 === null) {
|
4488
5022
|
peg$currPos = s2;
|
@@ -4498,7 +5032,7 @@ Emblem.Parser = (function() {
|
|
4498
5032
|
s3 = peg$parseidShorthand();
|
4499
5033
|
if (s3 !== null) {
|
4500
5034
|
peg$reportedPos = s2;
|
4501
|
-
s3 = peg$
|
5035
|
+
s3 = peg$c154(s3);
|
4502
5036
|
}
|
4503
5037
|
if (s3 === null) {
|
4504
5038
|
peg$currPos = s2;
|
@@ -4511,7 +5045,7 @@ Emblem.Parser = (function() {
|
|
4511
5045
|
s3 = peg$parseclassShorthand();
|
4512
5046
|
if (s3 !== null) {
|
4513
5047
|
peg$reportedPos = s2;
|
4514
|
-
s3 = peg$
|
5048
|
+
s3 = peg$c155(s3);
|
4515
5049
|
}
|
4516
5050
|
if (s3 === null) {
|
4517
5051
|
peg$currPos = s2;
|
@@ -4526,7 +5060,7 @@ Emblem.Parser = (function() {
|
|
4526
5060
|
}
|
4527
5061
|
if (s1 !== null) {
|
4528
5062
|
peg$reportedPos = s0;
|
4529
|
-
s1 = peg$
|
5063
|
+
s1 = peg$c156(s1);
|
4530
5064
|
}
|
4531
5065
|
if (s1 === null) {
|
4532
5066
|
peg$currPos = s0;
|
@@ -4580,7 +5114,7 @@ Emblem.Parser = (function() {
|
|
4580
5114
|
}
|
4581
5115
|
if (s2 !== null) {
|
4582
5116
|
peg$reportedPos = s0;
|
4583
|
-
s1 = peg$
|
5117
|
+
s1 = peg$c157(s2);
|
4584
5118
|
if (s1 === null) {
|
4585
5119
|
peg$currPos = s0;
|
4586
5120
|
s0 = s1;
|
@@ -4599,15 +5133,94 @@ Emblem.Parser = (function() {
|
|
4599
5133
|
return s0;
|
4600
5134
|
}
|
4601
5135
|
|
5136
|
+
function peg$parsebracketedAttribute() {
|
5137
|
+
var s0, s1, s2, s3, s4, s5;
|
5138
|
+
|
5139
|
+
s0 = peg$currPos;
|
5140
|
+
s1 = [];
|
5141
|
+
s2 = peg$parseINDENT();
|
5142
|
+
while (s2 !== null) {
|
5143
|
+
s1.push(s2);
|
5144
|
+
s2 = peg$parseINDENT();
|
5145
|
+
}
|
5146
|
+
if (s1 !== null) {
|
5147
|
+
s2 = [];
|
5148
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
5149
|
+
s3 = peg$c25;
|
5150
|
+
peg$currPos++;
|
5151
|
+
} else {
|
5152
|
+
s3 = null;
|
5153
|
+
if (peg$silentFails === 0) { peg$fail(peg$c26); }
|
5154
|
+
}
|
5155
|
+
while (s3 !== null) {
|
5156
|
+
s2.push(s3);
|
5157
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
5158
|
+
s3 = peg$c25;
|
5159
|
+
peg$currPos++;
|
5160
|
+
} else {
|
5161
|
+
s3 = null;
|
5162
|
+
if (peg$silentFails === 0) { peg$fail(peg$c26); }
|
5163
|
+
}
|
5164
|
+
}
|
5165
|
+
if (s2 !== null) {
|
5166
|
+
s3 = peg$parseactionAttribute();
|
5167
|
+
if (s3 === null) {
|
5168
|
+
s3 = peg$parsebooleanAttribute();
|
5169
|
+
if (s3 === null) {
|
5170
|
+
s3 = peg$parseboundAttribute();
|
5171
|
+
if (s3 === null) {
|
5172
|
+
s3 = peg$parserawMustacheAttribute();
|
5173
|
+
if (s3 === null) {
|
5174
|
+
s3 = peg$parsenormalAttribute();
|
5175
|
+
}
|
5176
|
+
}
|
5177
|
+
}
|
5178
|
+
}
|
5179
|
+
if (s3 !== null) {
|
5180
|
+
s4 = [];
|
5181
|
+
s5 = peg$parseTERM();
|
5182
|
+
while (s5 !== null) {
|
5183
|
+
s4.push(s5);
|
5184
|
+
s5 = peg$parseTERM();
|
5185
|
+
}
|
5186
|
+
if (s4 !== null) {
|
5187
|
+
peg$reportedPos = s0;
|
5188
|
+
s1 = peg$c157(s3);
|
5189
|
+
if (s1 === null) {
|
5190
|
+
peg$currPos = s0;
|
5191
|
+
s0 = s1;
|
5192
|
+
} else {
|
5193
|
+
s0 = s1;
|
5194
|
+
}
|
5195
|
+
} else {
|
5196
|
+
peg$currPos = s0;
|
5197
|
+
s0 = peg$c0;
|
5198
|
+
}
|
5199
|
+
} else {
|
5200
|
+
peg$currPos = s0;
|
5201
|
+
s0 = peg$c0;
|
5202
|
+
}
|
5203
|
+
} else {
|
5204
|
+
peg$currPos = s0;
|
5205
|
+
s0 = peg$c0;
|
5206
|
+
}
|
5207
|
+
} else {
|
5208
|
+
peg$currPos = s0;
|
5209
|
+
s0 = peg$c0;
|
5210
|
+
}
|
5211
|
+
|
5212
|
+
return s0;
|
5213
|
+
}
|
5214
|
+
|
4602
5215
|
function peg$parseboundAttributeValueChar() {
|
4603
5216
|
var s0;
|
4604
5217
|
|
4605
|
-
if (peg$
|
5218
|
+
if (peg$c158.test(input.charAt(peg$currPos))) {
|
4606
5219
|
s0 = input.charAt(peg$currPos);
|
4607
5220
|
peg$currPos++;
|
4608
5221
|
} else {
|
4609
5222
|
s0 = null;
|
4610
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5223
|
+
if (peg$silentFails === 0) { peg$fail(peg$c159); }
|
4611
5224
|
}
|
4612
5225
|
if (s0 === null) {
|
4613
5226
|
s0 = peg$parsenonSeparatorColon();
|
@@ -4625,7 +5238,7 @@ Emblem.Parser = (function() {
|
|
4625
5238
|
s1 = peg$parsepathIdNode();
|
4626
5239
|
if (s1 !== null) {
|
4627
5240
|
peg$reportedPos = s0;
|
4628
|
-
s1 = peg$
|
5241
|
+
s1 = peg$c160(s1);
|
4629
5242
|
}
|
4630
5243
|
if (s1 === null) {
|
4631
5244
|
peg$currPos = s0;
|
@@ -4644,21 +5257,21 @@ Emblem.Parser = (function() {
|
|
4644
5257
|
s0 = peg$currPos;
|
4645
5258
|
s1 = peg$currPos;
|
4646
5259
|
if (input.charCodeAt(peg$currPos) === 34) {
|
4647
|
-
s2 = peg$
|
5260
|
+
s2 = peg$c93;
|
4648
5261
|
peg$currPos++;
|
4649
5262
|
} else {
|
4650
5263
|
s2 = null;
|
4651
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5264
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
4652
5265
|
}
|
4653
5266
|
if (s2 !== null) {
|
4654
5267
|
s3 = peg$parseinMustache();
|
4655
5268
|
if (s3 !== null) {
|
4656
5269
|
if (input.charCodeAt(peg$currPos) === 34) {
|
4657
|
-
s4 = peg$
|
5270
|
+
s4 = peg$c93;
|
4658
5271
|
peg$currPos++;
|
4659
5272
|
} else {
|
4660
5273
|
s4 = null;
|
4661
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5274
|
+
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
4662
5275
|
}
|
4663
5276
|
if (s4 !== null) {
|
4664
5277
|
s2 = [s2, s3, s4];
|
@@ -4678,21 +5291,21 @@ Emblem.Parser = (function() {
|
|
4678
5291
|
if (s1 === null) {
|
4679
5292
|
s1 = peg$currPos;
|
4680
5293
|
if (input.charCodeAt(peg$currPos) === 39) {
|
4681
|
-
s2 = peg$
|
5294
|
+
s2 = peg$c95;
|
4682
5295
|
peg$currPos++;
|
4683
5296
|
} else {
|
4684
5297
|
s2 = null;
|
4685
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5298
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
4686
5299
|
}
|
4687
5300
|
if (s2 !== null) {
|
4688
5301
|
s3 = peg$parseinMustache();
|
4689
5302
|
if (s3 !== null) {
|
4690
5303
|
if (input.charCodeAt(peg$currPos) === 39) {
|
4691
|
-
s4 = peg$
|
5304
|
+
s4 = peg$c95;
|
4692
5305
|
peg$currPos++;
|
4693
5306
|
} else {
|
4694
5307
|
s4 = null;
|
4695
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5308
|
+
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
4696
5309
|
}
|
4697
5310
|
if (s4 !== null) {
|
4698
5311
|
s2 = [s2, s3, s4];
|
@@ -4712,7 +5325,7 @@ Emblem.Parser = (function() {
|
|
4712
5325
|
}
|
4713
5326
|
if (s1 !== null) {
|
4714
5327
|
peg$reportedPos = s0;
|
4715
|
-
s1 = peg$
|
5328
|
+
s1 = peg$c97(s1);
|
4716
5329
|
}
|
4717
5330
|
if (s1 === null) {
|
4718
5331
|
peg$currPos = s0;
|
@@ -4741,7 +5354,7 @@ Emblem.Parser = (function() {
|
|
4741
5354
|
s3 = peg$parseactionValue();
|
4742
5355
|
if (s3 !== null) {
|
4743
5356
|
peg$reportedPos = s0;
|
4744
|
-
s1 = peg$
|
5357
|
+
s1 = peg$c161(s1, s3);
|
4745
5358
|
if (s1 === null) {
|
4746
5359
|
peg$currPos = s0;
|
4747
5360
|
s0 = s1;
|
@@ -4778,25 +5391,25 @@ Emblem.Parser = (function() {
|
|
4778
5391
|
if (peg$silentFails === 0) { peg$fail(peg$c5); }
|
4779
5392
|
}
|
4780
5393
|
if (s2 !== null) {
|
4781
|
-
if (input.substr(peg$currPos, 4) === peg$
|
4782
|
-
s3 = peg$
|
5394
|
+
if (input.substr(peg$currPos, 4) === peg$c83) {
|
5395
|
+
s3 = peg$c83;
|
4783
5396
|
peg$currPos += 4;
|
4784
5397
|
} else {
|
4785
5398
|
s3 = null;
|
4786
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5399
|
+
if (peg$silentFails === 0) { peg$fail(peg$c84); }
|
4787
5400
|
}
|
4788
5401
|
if (s3 === null) {
|
4789
|
-
if (input.substr(peg$currPos, 5) === peg$
|
4790
|
-
s3 = peg$
|
5402
|
+
if (input.substr(peg$currPos, 5) === peg$c85) {
|
5403
|
+
s3 = peg$c85;
|
4791
5404
|
peg$currPos += 5;
|
4792
5405
|
} else {
|
4793
5406
|
s3 = null;
|
4794
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5407
|
+
if (peg$silentFails === 0) { peg$fail(peg$c86); }
|
4795
5408
|
}
|
4796
5409
|
}
|
4797
5410
|
if (s3 !== null) {
|
4798
5411
|
peg$reportedPos = s0;
|
4799
|
-
s1 = peg$
|
5412
|
+
s1 = peg$c162(s1, s3);
|
4800
5413
|
if (s1 === null) {
|
4801
5414
|
peg$currPos = s0;
|
4802
5415
|
s0 = s1;
|
@@ -4824,11 +5437,11 @@ Emblem.Parser = (function() {
|
|
4824
5437
|
|
4825
5438
|
s0 = peg$currPos;
|
4826
5439
|
if (input.charCodeAt(peg$currPos) === 123) {
|
4827
|
-
s1 = peg$
|
5440
|
+
s1 = peg$c113;
|
4828
5441
|
peg$currPos++;
|
4829
5442
|
} else {
|
4830
5443
|
s1 = null;
|
4831
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5444
|
+
if (peg$silentFails === 0) { peg$fail(peg$c114); }
|
4832
5445
|
}
|
4833
5446
|
if (s1 !== null) {
|
4834
5447
|
s2 = peg$parse_();
|
@@ -4870,15 +5483,15 @@ Emblem.Parser = (function() {
|
|
4870
5483
|
s4 = peg$parse_();
|
4871
5484
|
if (s4 !== null) {
|
4872
5485
|
if (input.charCodeAt(peg$currPos) === 125) {
|
4873
|
-
s5 = peg$
|
5486
|
+
s5 = peg$c130;
|
4874
5487
|
peg$currPos++;
|
4875
5488
|
} else {
|
4876
5489
|
s5 = null;
|
4877
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5490
|
+
if (peg$silentFails === 0) { peg$fail(peg$c131); }
|
4878
5491
|
}
|
4879
5492
|
if (s5 !== null) {
|
4880
5493
|
peg$reportedPos = s0;
|
4881
|
-
s1 = peg$
|
5494
|
+
s1 = peg$c163(s3);
|
4882
5495
|
if (s1 === null) {
|
4883
5496
|
peg$currPos = s0;
|
4884
5497
|
s0 = s1;
|
@@ -4945,11 +5558,11 @@ Emblem.Parser = (function() {
|
|
4945
5558
|
s4 = peg$currPos;
|
4946
5559
|
peg$silentFails++;
|
4947
5560
|
if (input.charCodeAt(peg$currPos) === 33) {
|
4948
|
-
s5 = peg$
|
5561
|
+
s5 = peg$c164;
|
4949
5562
|
peg$currPos++;
|
4950
5563
|
} else {
|
4951
5564
|
s5 = null;
|
4952
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5565
|
+
if (peg$silentFails === 0) { peg$fail(peg$c165); }
|
4953
5566
|
}
|
4954
5567
|
peg$silentFails--;
|
4955
5568
|
if (s5 === null) {
|
@@ -4960,7 +5573,7 @@ Emblem.Parser = (function() {
|
|
4960
5573
|
}
|
4961
5574
|
if (s4 !== null) {
|
4962
5575
|
peg$reportedPos = peg$currPos;
|
4963
|
-
s5 = peg$
|
5576
|
+
s5 = peg$c166(s1, s3);
|
4964
5577
|
if (s5) {
|
4965
5578
|
s5 = peg$c1;
|
4966
5579
|
} else {
|
@@ -4968,7 +5581,7 @@ Emblem.Parser = (function() {
|
|
4968
5581
|
}
|
4969
5582
|
if (s5 !== null) {
|
4970
5583
|
peg$reportedPos = s0;
|
4971
|
-
s1 = peg$
|
5584
|
+
s1 = peg$c167(s1, s3);
|
4972
5585
|
if (s1 === null) {
|
4973
5586
|
peg$currPos = s0;
|
4974
5587
|
s0 = s1;
|
@@ -5016,7 +5629,7 @@ Emblem.Parser = (function() {
|
|
5016
5629
|
s3 = peg$parsepathIdNode();
|
5017
5630
|
if (s3 !== null) {
|
5018
5631
|
peg$reportedPos = s0;
|
5019
|
-
s1 = peg$
|
5632
|
+
s1 = peg$c168(s1, s3);
|
5020
5633
|
if (s1 === null) {
|
5021
5634
|
peg$currPos = s0;
|
5022
5635
|
s0 = s1;
|
@@ -5056,7 +5669,7 @@ Emblem.Parser = (function() {
|
|
5056
5669
|
s3 = peg$parseattributeTextNodes();
|
5057
5670
|
if (s3 !== null) {
|
5058
5671
|
peg$reportedPos = s0;
|
5059
|
-
s1 = peg$
|
5672
|
+
s1 = peg$c169(s1, s3);
|
5060
5673
|
if (s1 === null) {
|
5061
5674
|
peg$currPos = s0;
|
5062
5675
|
s0 = s1;
|
@@ -5102,28 +5715,28 @@ Emblem.Parser = (function() {
|
|
5102
5715
|
|
5103
5716
|
s0 = peg$parsealpha();
|
5104
5717
|
if (s0 === null) {
|
5105
|
-
if (peg$
|
5718
|
+
if (peg$c90.test(input.charAt(peg$currPos))) {
|
5106
5719
|
s0 = input.charAt(peg$currPos);
|
5107
5720
|
peg$currPos++;
|
5108
5721
|
} else {
|
5109
5722
|
s0 = null;
|
5110
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5723
|
+
if (peg$silentFails === 0) { peg$fail(peg$c91); }
|
5111
5724
|
}
|
5112
5725
|
if (s0 === null) {
|
5113
5726
|
if (input.charCodeAt(peg$currPos) === 95) {
|
5114
|
-
s0 = peg$
|
5727
|
+
s0 = peg$c170;
|
5115
5728
|
peg$currPos++;
|
5116
5729
|
} else {
|
5117
5730
|
s0 = null;
|
5118
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5731
|
+
if (peg$silentFails === 0) { peg$fail(peg$c171); }
|
5119
5732
|
}
|
5120
5733
|
if (s0 === null) {
|
5121
5734
|
if (input.charCodeAt(peg$currPos) === 45) {
|
5122
|
-
s0 = peg$
|
5735
|
+
s0 = peg$c88;
|
5123
5736
|
peg$currPos++;
|
5124
5737
|
} else {
|
5125
5738
|
s0 = null;
|
5126
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5739
|
+
if (peg$silentFails === 0) { peg$fail(peg$c89); }
|
5127
5740
|
}
|
5128
5741
|
}
|
5129
5742
|
}
|
@@ -5137,11 +5750,11 @@ Emblem.Parser = (function() {
|
|
5137
5750
|
|
5138
5751
|
s0 = peg$currPos;
|
5139
5752
|
if (input.charCodeAt(peg$currPos) === 37) {
|
5140
|
-
s1 = peg$
|
5753
|
+
s1 = peg$c172;
|
5141
5754
|
peg$currPos++;
|
5142
5755
|
} else {
|
5143
5756
|
s1 = null;
|
5144
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5757
|
+
if (peg$silentFails === 0) { peg$fail(peg$c173); }
|
5145
5758
|
}
|
5146
5759
|
if (s1 !== null) {
|
5147
5760
|
s2 = peg$parsecssIdentifier();
|
@@ -5171,17 +5784,17 @@ Emblem.Parser = (function() {
|
|
5171
5784
|
|
5172
5785
|
s0 = peg$currPos;
|
5173
5786
|
if (input.charCodeAt(peg$currPos) === 35) {
|
5174
|
-
s1 = peg$
|
5787
|
+
s1 = peg$c174;
|
5175
5788
|
peg$currPos++;
|
5176
5789
|
} else {
|
5177
5790
|
s1 = null;
|
5178
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5791
|
+
if (peg$silentFails === 0) { peg$fail(peg$c175); }
|
5179
5792
|
}
|
5180
5793
|
if (s1 !== null) {
|
5181
5794
|
s2 = peg$parsecssIdentifier();
|
5182
5795
|
if (s2 !== null) {
|
5183
5796
|
peg$reportedPos = s0;
|
5184
|
-
s1 = peg$
|
5797
|
+
s1 = peg$c176(s2);
|
5185
5798
|
if (s1 === null) {
|
5186
5799
|
peg$currPos = s0;
|
5187
5800
|
s0 = s1;
|
@@ -5205,11 +5818,11 @@ Emblem.Parser = (function() {
|
|
5205
5818
|
|
5206
5819
|
s0 = peg$currPos;
|
5207
5820
|
if (input.charCodeAt(peg$currPos) === 46) {
|
5208
|
-
s1 = peg$
|
5821
|
+
s1 = peg$c59;
|
5209
5822
|
peg$currPos++;
|
5210
5823
|
} else {
|
5211
5824
|
s1 = null;
|
5212
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5825
|
+
if (peg$silentFails === 0) { peg$fail(peg$c60); }
|
5213
5826
|
}
|
5214
5827
|
if (s1 !== null) {
|
5215
5828
|
s2 = peg$parsecssIdentifier();
|
@@ -5242,7 +5855,7 @@ Emblem.Parser = (function() {
|
|
5242
5855
|
peg$silentFails--;
|
5243
5856
|
if (s0 === null) {
|
5244
5857
|
s1 = null;
|
5245
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5858
|
+
if (peg$silentFails === 0) { peg$fail(peg$c177); }
|
5246
5859
|
}
|
5247
5860
|
|
5248
5861
|
return s0;
|
@@ -5273,12 +5886,12 @@ Emblem.Parser = (function() {
|
|
5273
5886
|
function peg$parsenmchar() {
|
5274
5887
|
var s0;
|
5275
5888
|
|
5276
|
-
if (peg$
|
5889
|
+
if (peg$c178.test(input.charAt(peg$currPos))) {
|
5277
5890
|
s0 = input.charAt(peg$currPos);
|
5278
5891
|
peg$currPos++;
|
5279
5892
|
} else {
|
5280
5893
|
s0 = null;
|
5281
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5894
|
+
if (peg$silentFails === 0) { peg$fail(peg$c179); }
|
5282
5895
|
}
|
5283
5896
|
if (s0 === null) {
|
5284
5897
|
s0 = peg$parsenonascii();
|
@@ -5290,12 +5903,12 @@ Emblem.Parser = (function() {
|
|
5290
5903
|
function peg$parsenmstart() {
|
5291
5904
|
var s0;
|
5292
5905
|
|
5293
|
-
if (peg$
|
5906
|
+
if (peg$c180.test(input.charAt(peg$currPos))) {
|
5294
5907
|
s0 = input.charAt(peg$currPos);
|
5295
5908
|
peg$currPos++;
|
5296
5909
|
} else {
|
5297
5910
|
s0 = null;
|
5298
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5911
|
+
if (peg$silentFails === 0) { peg$fail(peg$c181); }
|
5299
5912
|
}
|
5300
5913
|
if (s0 === null) {
|
5301
5914
|
s0 = peg$parsenonascii();
|
@@ -5307,12 +5920,12 @@ Emblem.Parser = (function() {
|
|
5307
5920
|
function peg$parsenonascii() {
|
5308
5921
|
var s0;
|
5309
5922
|
|
5310
|
-
if (peg$
|
5923
|
+
if (peg$c182.test(input.charAt(peg$currPos))) {
|
5311
5924
|
s0 = input.charAt(peg$currPos);
|
5312
5925
|
peg$currPos++;
|
5313
5926
|
} else {
|
5314
5927
|
s0 = null;
|
5315
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5928
|
+
if (peg$silentFails === 0) { peg$fail(peg$c183); }
|
5316
5929
|
}
|
5317
5930
|
|
5318
5931
|
return s0;
|
@@ -5346,11 +5959,11 @@ Emblem.Parser = (function() {
|
|
5346
5959
|
peg$silentFails++;
|
5347
5960
|
s0 = peg$currPos;
|
5348
5961
|
if (input.charCodeAt(peg$currPos) === 37) {
|
5349
|
-
s1 = peg$
|
5962
|
+
s1 = peg$c172;
|
5350
5963
|
peg$currPos++;
|
5351
5964
|
} else {
|
5352
5965
|
s1 = null;
|
5353
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5966
|
+
if (peg$silentFails === 0) { peg$fail(peg$c173); }
|
5354
5967
|
}
|
5355
5968
|
if (s1 !== null) {
|
5356
5969
|
s2 = peg$parse_();
|
@@ -5358,7 +5971,7 @@ Emblem.Parser = (function() {
|
|
5358
5971
|
s3 = peg$parsetagString();
|
5359
5972
|
if (s3 !== null) {
|
5360
5973
|
peg$reportedPos = s0;
|
5361
|
-
s1 = peg$
|
5974
|
+
s1 = peg$c63(s3);
|
5362
5975
|
if (s1 === null) {
|
5363
5976
|
peg$currPos = s0;
|
5364
5977
|
s0 = s1;
|
@@ -5383,7 +5996,7 @@ Emblem.Parser = (function() {
|
|
5383
5996
|
peg$silentFails--;
|
5384
5997
|
if (s0 === null) {
|
5385
5998
|
s1 = null;
|
5386
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
5999
|
+
if (peg$silentFails === 0) { peg$fail(peg$c184); }
|
5387
6000
|
}
|
5388
6001
|
|
5389
6002
|
return s0;
|
@@ -5396,7 +6009,7 @@ Emblem.Parser = (function() {
|
|
5396
6009
|
s1 = peg$parsetagString();
|
5397
6010
|
if (s1 !== null) {
|
5398
6011
|
peg$reportedPos = peg$currPos;
|
5399
|
-
s2 = peg$
|
6012
|
+
s2 = peg$c185(s1);
|
5400
6013
|
if (s2) {
|
5401
6014
|
s2 = peg$c1;
|
5402
6015
|
} else {
|
@@ -5404,7 +6017,7 @@ Emblem.Parser = (function() {
|
|
5404
6017
|
}
|
5405
6018
|
if (s2 !== null) {
|
5406
6019
|
peg$reportedPos = s0;
|
5407
|
-
s1 = peg$
|
6020
|
+
s1 = peg$c186(s1);
|
5408
6021
|
if (s1 === null) {
|
5409
6022
|
peg$currPos = s0;
|
5410
6023
|
s0 = s1;
|
@@ -5426,12 +6039,12 @@ Emblem.Parser = (function() {
|
|
5426
6039
|
function peg$parsetagChar() {
|
5427
6040
|
var s0;
|
5428
6041
|
|
5429
|
-
if (peg$
|
6042
|
+
if (peg$c178.test(input.charAt(peg$currPos))) {
|
5430
6043
|
s0 = input.charAt(peg$currPos);
|
5431
6044
|
peg$currPos++;
|
5432
6045
|
} else {
|
5433
6046
|
s0 = null;
|
5434
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6047
|
+
if (peg$silentFails === 0) { peg$fail(peg$c179); }
|
5435
6048
|
}
|
5436
6049
|
if (s0 === null) {
|
5437
6050
|
s0 = peg$parsenonSeparatorColon();
|
@@ -5445,11 +6058,11 @@ Emblem.Parser = (function() {
|
|
5445
6058
|
|
5446
6059
|
s0 = peg$currPos;
|
5447
6060
|
if (input.charCodeAt(peg$currPos) === 58) {
|
5448
|
-
s1 = peg$
|
6061
|
+
s1 = peg$c68;
|
5449
6062
|
peg$currPos++;
|
5450
6063
|
} else {
|
5451
6064
|
s1 = null;
|
5452
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6065
|
+
if (peg$silentFails === 0) { peg$fail(peg$c69); }
|
5453
6066
|
}
|
5454
6067
|
if (s1 !== null) {
|
5455
6068
|
s2 = peg$currPos;
|
@@ -5497,7 +6110,7 @@ Emblem.Parser = (function() {
|
|
5497
6110
|
s1 = peg$parsetagString();
|
5498
6111
|
if (s1 !== null) {
|
5499
6112
|
peg$reportedPos = peg$currPos;
|
5500
|
-
s2 = peg$
|
6113
|
+
s2 = peg$c188(s1);
|
5501
6114
|
if (s2) {
|
5502
6115
|
s2 = peg$c1;
|
5503
6116
|
} else {
|
@@ -5505,7 +6118,7 @@ Emblem.Parser = (function() {
|
|
5505
6118
|
}
|
5506
6119
|
if (s2 !== null) {
|
5507
6120
|
peg$reportedPos = s0;
|
5508
|
-
s1 = peg$
|
6121
|
+
s1 = peg$c186(s1);
|
5509
6122
|
if (s1 === null) {
|
5510
6123
|
peg$currPos = s0;
|
5511
6124
|
s0 = s1;
|
@@ -5523,7 +6136,7 @@ Emblem.Parser = (function() {
|
|
5523
6136
|
peg$silentFails--;
|
5524
6137
|
if (s0 === null) {
|
5525
6138
|
s1 = null;
|
5526
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6139
|
+
if (peg$silentFails === 0) { peg$fail(peg$c187); }
|
5527
6140
|
}
|
5528
6141
|
|
5529
6142
|
return s0;
|
@@ -5538,7 +6151,7 @@ Emblem.Parser = (function() {
|
|
5538
6151
|
s2 = peg$parse__();
|
5539
6152
|
if (s2 !== null) {
|
5540
6153
|
peg$reportedPos = s0;
|
5541
|
-
s1 = peg$
|
6154
|
+
s1 = peg$c63(s2);
|
5542
6155
|
if (s1 === null) {
|
5543
6156
|
peg$currPos = s0;
|
5544
6157
|
s0 = s1;
|
@@ -5563,15 +6176,15 @@ Emblem.Parser = (function() {
|
|
5563
6176
|
peg$silentFails++;
|
5564
6177
|
s0 = peg$currPos;
|
5565
6178
|
if (input.charCodeAt(peg$currPos) === 61423) {
|
5566
|
-
s1 = peg$
|
6179
|
+
s1 = peg$c190;
|
5567
6180
|
peg$currPos++;
|
5568
6181
|
} else {
|
5569
6182
|
s1 = null;
|
5570
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6183
|
+
if (peg$silentFails === 0) { peg$fail(peg$c191); }
|
5571
6184
|
}
|
5572
6185
|
if (s1 !== null) {
|
5573
6186
|
peg$reportedPos = s0;
|
5574
|
-
s1 = peg$
|
6187
|
+
s1 = peg$c192();
|
5575
6188
|
}
|
5576
6189
|
if (s1 === null) {
|
5577
6190
|
peg$currPos = s0;
|
@@ -5582,7 +6195,7 @@ Emblem.Parser = (function() {
|
|
5582
6195
|
peg$silentFails--;
|
5583
6196
|
if (s0 === null) {
|
5584
6197
|
s1 = null;
|
5585
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6198
|
+
if (peg$silentFails === 0) { peg$fail(peg$c189); }
|
5586
6199
|
}
|
5587
6200
|
|
5588
6201
|
return s0;
|
@@ -5594,15 +6207,15 @@ Emblem.Parser = (function() {
|
|
5594
6207
|
peg$silentFails++;
|
5595
6208
|
s0 = peg$currPos;
|
5596
6209
|
if (input.charCodeAt(peg$currPos) === 61438) {
|
5597
|
-
s1 = peg$
|
6210
|
+
s1 = peg$c194;
|
5598
6211
|
peg$currPos++;
|
5599
6212
|
} else {
|
5600
6213
|
s1 = null;
|
5601
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6214
|
+
if (peg$silentFails === 0) { peg$fail(peg$c195); }
|
5602
6215
|
}
|
5603
6216
|
if (s1 !== null) {
|
5604
6217
|
peg$reportedPos = s0;
|
5605
|
-
s1 = peg$
|
6218
|
+
s1 = peg$c192();
|
5606
6219
|
}
|
5607
6220
|
if (s1 === null) {
|
5608
6221
|
peg$currPos = s0;
|
@@ -5613,7 +6226,7 @@ Emblem.Parser = (function() {
|
|
5613
6226
|
peg$silentFails--;
|
5614
6227
|
if (s0 === null) {
|
5615
6228
|
s1 = null;
|
5616
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6229
|
+
if (peg$silentFails === 0) { peg$fail(peg$c193); }
|
5617
6230
|
}
|
5618
6231
|
|
5619
6232
|
return s0;
|
@@ -5625,15 +6238,15 @@ Emblem.Parser = (function() {
|
|
5625
6238
|
peg$silentFails++;
|
5626
6239
|
s0 = peg$currPos;
|
5627
6240
|
if (input.charCodeAt(peg$currPos) === 61422) {
|
5628
|
-
s1 = peg$
|
6241
|
+
s1 = peg$c197;
|
5629
6242
|
peg$currPos++;
|
5630
6243
|
} else {
|
5631
6244
|
s1 = null;
|
5632
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6245
|
+
if (peg$silentFails === 0) { peg$fail(peg$c198); }
|
5633
6246
|
}
|
5634
6247
|
if (s1 !== null) {
|
5635
6248
|
peg$reportedPos = s0;
|
5636
|
-
s1 = peg$
|
6249
|
+
s1 = peg$c192();
|
5637
6250
|
}
|
5638
6251
|
if (s1 === null) {
|
5639
6252
|
peg$currPos = s0;
|
@@ -5644,7 +6257,7 @@ Emblem.Parser = (function() {
|
|
5644
6257
|
peg$silentFails--;
|
5645
6258
|
if (s0 === null) {
|
5646
6259
|
s1 = null;
|
5647
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6260
|
+
if (peg$silentFails === 0) { peg$fail(peg$c196); }
|
5648
6261
|
}
|
5649
6262
|
|
5650
6263
|
return s0;
|
@@ -5656,34 +6269,34 @@ Emblem.Parser = (function() {
|
|
5656
6269
|
peg$silentFails++;
|
5657
6270
|
s0 = peg$currPos;
|
5658
6271
|
if (input.charCodeAt(peg$currPos) === 13) {
|
5659
|
-
s1 = peg$
|
6272
|
+
s1 = peg$c200;
|
5660
6273
|
peg$currPos++;
|
5661
6274
|
} else {
|
5662
6275
|
s1 = null;
|
5663
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6276
|
+
if (peg$silentFails === 0) { peg$fail(peg$c201); }
|
5664
6277
|
}
|
5665
6278
|
if (s1 === null) {
|
5666
6279
|
s1 = peg$c1;
|
5667
6280
|
}
|
5668
6281
|
if (s1 !== null) {
|
5669
6282
|
if (input.charCodeAt(peg$currPos) === 61439) {
|
5670
|
-
s2 = peg$
|
6283
|
+
s2 = peg$c202;
|
5671
6284
|
peg$currPos++;
|
5672
6285
|
} else {
|
5673
6286
|
s2 = null;
|
5674
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6287
|
+
if (peg$silentFails === 0) { peg$fail(peg$c203); }
|
5675
6288
|
}
|
5676
6289
|
if (s2 !== null) {
|
5677
6290
|
if (input.charCodeAt(peg$currPos) === 10) {
|
5678
|
-
s3 = peg$
|
6291
|
+
s3 = peg$c204;
|
5679
6292
|
peg$currPos++;
|
5680
6293
|
} else {
|
5681
6294
|
s3 = null;
|
5682
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6295
|
+
if (peg$silentFails === 0) { peg$fail(peg$c205); }
|
5683
6296
|
}
|
5684
6297
|
if (s3 !== null) {
|
5685
6298
|
peg$reportedPos = s0;
|
5686
|
-
s1 = peg$
|
6299
|
+
s1 = peg$c150();
|
5687
6300
|
if (s1 === null) {
|
5688
6301
|
peg$currPos = s0;
|
5689
6302
|
s0 = s1;
|
@@ -5705,7 +6318,7 @@ Emblem.Parser = (function() {
|
|
5705
6318
|
peg$silentFails--;
|
5706
6319
|
if (s0 === null) {
|
5707
6320
|
s1 = null;
|
5708
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6321
|
+
if (peg$silentFails === 0) { peg$fail(peg$c199); }
|
5709
6322
|
}
|
5710
6323
|
|
5711
6324
|
return s0;
|
@@ -5722,7 +6335,7 @@ Emblem.Parser = (function() {
|
|
5722
6335
|
peg$silentFails--;
|
5723
6336
|
if (s0 === null) {
|
5724
6337
|
s1 = null;
|
5725
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6338
|
+
if (peg$silentFails === 0) { peg$fail(peg$c206); }
|
5726
6339
|
}
|
5727
6340
|
|
5728
6341
|
return s0;
|
@@ -5750,7 +6363,7 @@ Emblem.Parser = (function() {
|
|
5750
6363
|
peg$silentFails--;
|
5751
6364
|
if (s0 === null) {
|
5752
6365
|
s1 = null;
|
5753
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6366
|
+
if (peg$silentFails === 0) { peg$fail(peg$c207); }
|
5754
6367
|
}
|
5755
6368
|
|
5756
6369
|
return s0;
|
@@ -5769,7 +6382,7 @@ Emblem.Parser = (function() {
|
|
5769
6382
|
peg$silentFails--;
|
5770
6383
|
if (s0 === null) {
|
5771
6384
|
s1 = null;
|
5772
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6385
|
+
if (peg$silentFails === 0) { peg$fail(peg$c208); }
|
5773
6386
|
}
|
5774
6387
|
|
5775
6388
|
return s0;
|
@@ -5779,17 +6392,17 @@ Emblem.Parser = (function() {
|
|
5779
6392
|
var s0, s1;
|
5780
6393
|
|
5781
6394
|
peg$silentFails++;
|
5782
|
-
if (peg$
|
6395
|
+
if (peg$c210.test(input.charAt(peg$currPos))) {
|
5783
6396
|
s0 = input.charAt(peg$currPos);
|
5784
6397
|
peg$currPos++;
|
5785
6398
|
} else {
|
5786
6399
|
s0 = null;
|
5787
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6400
|
+
if (peg$silentFails === 0) { peg$fail(peg$c211); }
|
5788
6401
|
}
|
5789
6402
|
peg$silentFails--;
|
5790
6403
|
if (s0 === null) {
|
5791
6404
|
s1 = null;
|
5792
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6405
|
+
if (peg$silentFails === 0) { peg$fail(peg$c209); }
|
5793
6406
|
}
|
5794
6407
|
|
5795
6408
|
return s0;
|
@@ -5821,7 +6434,7 @@ Emblem.Parser = (function() {
|
|
5821
6434
|
peg$currPos++;
|
5822
6435
|
} else {
|
5823
6436
|
s2 = null;
|
5824
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
6437
|
+
if (peg$silentFails === 0) { peg$fail(peg$c121); }
|
5825
6438
|
}
|
5826
6439
|
if (s2 !== null) {
|
5827
6440
|
peg$reportedPos = s0;
|
@@ -5885,7 +6498,6 @@ Emblem.Parser = (function() {
|
|
5885
6498
|
track: true,
|
5886
6499
|
wbr: true
|
5887
6500
|
};
|
5888
|
-
|
5889
6501
|
var KNOWN_TAGS = {
|
5890
6502
|
figcaption: true, blockquote: true, plaintext: true, textarea: true, progress: true,
|
5891
6503
|
optgroup: true, noscript: true, noframes: true, frameset: true, fieldset: true,
|
@@ -5983,6 +6595,138 @@ Emblem.Parser = (function() {
|
|
5983
6595
|
function log(msg) {
|
5984
6596
|
handlebarsVariant.log(9, msg);
|
5985
6597
|
}
|
6598
|
+
function parseSexpr(path, params, hash){
|
6599
|
+
var actualParams = [];
|
6600
|
+
var attrs = {};
|
6601
|
+
var hasAttrs = false;
|
6602
|
+
|
6603
|
+
// Convert shorthand html attributes (e.g. % = tagName, . = class, etc)
|
6604
|
+
for(var i = 0; i < params.length; ++i) {
|
6605
|
+
var p = params[i];
|
6606
|
+
var attrKey = p[0];
|
6607
|
+
if(attrKey == 'tagName' || attrKey == 'elementId' || attrKey == 'class') {
|
6608
|
+
hasAttrs = true;
|
6609
|
+
attrs[attrKey] = attrs[attrKey] || [];
|
6610
|
+
attrs[attrKey].push(p[1]);
|
6611
|
+
} else {
|
6612
|
+
actualParams.push(p);
|
6613
|
+
}
|
6614
|
+
}
|
6615
|
+
|
6616
|
+
if(hasAttrs) {
|
6617
|
+
hash = hash || new AST.HashNode([]);
|
6618
|
+
for(var k in attrs) {
|
6619
|
+
if(!attrs.hasOwnProperty(k)) continue;
|
6620
|
+
hash.pairs.push([k, new AST.StringNode(attrs[k].join(' '))]);
|
6621
|
+
}
|
6622
|
+
}
|
6623
|
+
|
6624
|
+
actualParams.unshift(path);
|
6625
|
+
|
6626
|
+
if (useSexprNodes) {
|
6627
|
+
return new AST.SexprNode(actualParams, hash);
|
6628
|
+
} else {
|
6629
|
+
// Stub a sexpr-like node for backwards compatibility with pre-1.3 AST.
|
6630
|
+
return {
|
6631
|
+
id: actualParams[0],
|
6632
|
+
params: actualParams.slice(1),
|
6633
|
+
hash: hash
|
6634
|
+
};
|
6635
|
+
}
|
6636
|
+
}
|
6637
|
+
function parseInHtml(h, inTagMustaches, fullAttributes) {
|
6638
|
+
|
6639
|
+
var tagName = h[0] || 'div',
|
6640
|
+
shorthandAttributes = h[1] || [],
|
6641
|
+
id = shorthandAttributes[0],
|
6642
|
+
classes = shorthandAttributes[1] || [],
|
6643
|
+
tagOpenContent = [],
|
6644
|
+
updateMustacheNode;
|
6645
|
+
|
6646
|
+
updateMustacheNode = function (node) {
|
6647
|
+
var pairs, pair, stringNode, original;
|
6648
|
+
if (!classes.length) {
|
6649
|
+
return;
|
6650
|
+
}
|
6651
|
+
if (!node.id || node.id.string !== 'bind-attr') {
|
6652
|
+
return;
|
6653
|
+
}
|
6654
|
+
if (node.hash && node.hash.pairs && (pairs = node.hash.pairs)) {
|
6655
|
+
for (var i2 in pairs) {
|
6656
|
+
if (!pairs.hasOwnProperty(i2)) { continue; }
|
6657
|
+
pair = pairs[i2];
|
6658
|
+
if (pair && pair[0] === 'class' && pair[1] instanceof AST.StringNode) {
|
6659
|
+
stringNode = pair[1];
|
6660
|
+
original = stringNode.original;
|
6661
|
+
stringNode.original = stringNode.string = stringNode.stringModeValue = ':' + classes.join(' :') + ' ' + original;
|
6662
|
+
classes = [];
|
6663
|
+
}
|
6664
|
+
}
|
6665
|
+
}
|
6666
|
+
};
|
6667
|
+
|
6668
|
+
tagOpenContent.push(new AST.ContentNode('<' + tagName));
|
6669
|
+
|
6670
|
+
if(id) {
|
6671
|
+
tagOpenContent.push(new AST.ContentNode(' id="' + id + '"'));
|
6672
|
+
}
|
6673
|
+
|
6674
|
+
// Pad in tag mustaches with spaces.
|
6675
|
+
for(var i = 0; i < inTagMustaches.length; ++i) {
|
6676
|
+
// Check if given mustache node has class bindings and prepend shorthand classes
|
6677
|
+
updateMustacheNode(inTagMustaches[i]);
|
6678
|
+
tagOpenContent.push(new AST.ContentNode(' '));
|
6679
|
+
tagOpenContent.push(inTagMustaches[i]);
|
6680
|
+
}
|
6681
|
+
for(var i = 0; i < fullAttributes.length; ++i) {
|
6682
|
+
for (var i2 in fullAttributes[i]) {
|
6683
|
+
if (fullAttributes[i][i2] instanceof AST.MustacheNode) {
|
6684
|
+
updateMustacheNode(fullAttributes[i][i2]);
|
6685
|
+
}
|
6686
|
+
}
|
6687
|
+
if (classes.length) {
|
6688
|
+
var isClassAttr = fullAttributes[i][1] && fullAttributes[i][1].string === 'class="';
|
6689
|
+
|
6690
|
+
// Check if attribute is class attribute and has content
|
6691
|
+
if (isClassAttr && fullAttributes[i].length === 4) {
|
6692
|
+
if (fullAttributes[i][2].type == 'mustache') {
|
6693
|
+
var mustacheNode, classesContent, hash, params;
|
6694
|
+
// If class was mustache binding, transform attribute into bind-attr MustacheNode
|
6695
|
+
// In case of 'div.shorthand class=varBinding' will transform into '<div {{bind-attr class=":shorthand varBinding"}}'
|
6696
|
+
mustacheNode = fullAttributes[i][2];
|
6697
|
+
classesContent = ':' + classes.join(' :') + ' ' + mustacheNode.id.original;
|
6698
|
+
hash = new AST.HashNode([
|
6699
|
+
['class', new AST.StringNode(classesContent)]
|
6700
|
+
]);
|
6701
|
+
|
6702
|
+
params = [new AST.IdNode([{ part: 'bind-attr'}])].concat(mustacheNode.params);
|
6703
|
+
fullAttributes[i] = [fullAttributes[i][0], createMustacheNode(params, hash, true)];
|
6704
|
+
} else {
|
6705
|
+
// Else prepend shorthand classes to attribute
|
6706
|
+
classes.push(fullAttributes[i][2].string);
|
6707
|
+
fullAttributes[i][2].string = classes.join(' ');
|
6708
|
+
}
|
6709
|
+
classes = [];
|
6710
|
+
}
|
6711
|
+
}
|
6712
|
+
|
6713
|
+
tagOpenContent = tagOpenContent.concat(fullAttributes[i]);
|
6714
|
+
}
|
6715
|
+
|
6716
|
+
if(classes && classes.length) {
|
6717
|
+
tagOpenContent.push(new AST.ContentNode(' class="' + classes.join(' ') + '"'));
|
6718
|
+
}
|
6719
|
+
var closingTagSlashPresent = !!h[2];
|
6720
|
+
if(SELF_CLOSING_TAG[tagName] || closingTagSlashPresent) {
|
6721
|
+
tagOpenContent.push(new AST.ContentNode(' />'));
|
6722
|
+
return [tagOpenContent];
|
6723
|
+
} else {
|
6724
|
+
|
6725
|
+
tagOpenContent.push(new AST.ContentNode('>'));
|
6726
|
+
|
6727
|
+
return [tagOpenContent, new AST.ContentNode('</' + tagName + '>')];
|
6728
|
+
}
|
6729
|
+
}
|
5986
6730
|
|
5987
6731
|
|
5988
6732
|
peg$result = peg$startRuleFunction();
|