@weborigami/language 0.0.39 → 0.0.41

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.
@@ -182,7 +182,7 @@ function peg$parse(input, options) {
182
182
  var peg$FAILED = {};
183
183
  var peg$source = options.grammarSource;
184
184
 
185
- var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, argsChain: peg$parseargsChain, assignment: peg$parseassignment, assignmentOrShorthand: peg$parseassignmentOrShorthand, array: peg$parsearray, callTarget: peg$parsecallTarget, comment: peg$parsecomment, digits: peg$parsedigits, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, escapedChar: peg$parseescapedChar, expr: peg$parseexpr, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, group: peg$parsegroup, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, implicitParensCall: peg$parseimplicitParensCall, host: peg$parsehost, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectProperties: peg$parseobjectProperties, objectProperty: peg$parseobjectProperty, objectPropertyOrShorthand: peg$parseobjectPropertyOrShorthand, parensArgs: peg$parseparensArgs, separator: peg$parseseparator, sign: peg$parsesign, path: peg$parsepath, pathKey: peg$parsepathKey, protocolCall: peg$parseprotocolCall, protocol: peg$parseprotocol, reservedProtocol: peg$parsereservedProtocol, scopeReference: peg$parsescopeReference, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, start: peg$parsestart, string: peg$parsestring, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, tree: peg$parsetree, treeAssignments: peg$parsetreeAssignments, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
185
+ var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, args: peg$parseargs, assignment: peg$parseassignment, assignmentOrShorthand: peg$parseassignmentOrShorthand, array: peg$parsearray, callTarget: peg$parsecallTarget, comment: peg$parsecomment, digits: peg$parsedigits, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, escapedChar: peg$parseescapedChar, expr: peg$parseexpr, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, group: peg$parsegroup, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParensCall: peg$parseimplicitParensCall, host: peg$parsehost, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectProperties: peg$parseobjectProperties, objectProperty: peg$parseobjectProperty, objectPropertyOrShorthand: peg$parseobjectPropertyOrShorthand, parameterizedLambda: peg$parseparameterizedLambda, parensArgs: peg$parseparensArgs, separator: peg$parseseparator, sign: peg$parsesign, path: peg$parsepath, pathKey: peg$parsepathKey, protocolCall: peg$parseprotocolCall, protocol: peg$parseprotocol, reservedProtocol: peg$parsereservedProtocol, scopeReference: peg$parsescopeReference, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, start: peg$parsestart, string: peg$parsestring, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, tree: peg$parsetree, treeAssignments: peg$parsetreeAssignments, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
186
186
  var peg$startRuleFunction = peg$parse__;
187
187
 
188
188
  var peg$c0 = "=";
@@ -201,63 +201,102 @@ function peg$parse(input, options) {
201
201
  var peg$c13 = "\r";
202
202
  var peg$c14 = "{";
203
203
  var peg$c15 = "}";
204
- var peg$c16 = ",";
205
- var peg$c17 = "https";
206
- var peg$c18 = "http";
207
- var peg$c19 = "package";
208
- var peg$c20 = "treehttps";
209
- var peg$c21 = "treehttp";
210
- var peg$c22 = "tree";
211
- var peg$c23 = "'";
212
- var peg$c24 = "{{";
213
- var peg$c25 = "`";
214
- var peg$c26 = "}}";
204
+ var peg$c16 = "=>";
205
+ var peg$c17 = "\u21D2";
206
+ var peg$c18 = ",";
207
+ var peg$c19 = "https";
208
+ var peg$c20 = "http";
209
+ var peg$c21 = "package";
210
+ var peg$c22 = "treehttps";
211
+ var peg$c23 = "treehttp";
212
+ var peg$c24 = "tree";
213
+ var peg$c25 = "'";
214
+ var peg$c26 = "{{";
215
+ var peg$c27 = "`";
216
+ var peg$c28 = "}}";
215
217
 
216
218
  var peg$r0 = /^[^\n\r]/;
217
219
  var peg$r1 = /^[0-9]/;
218
- var peg$r2 = /^[^(){}[\],\/:=`"'\\# \t\n\r]/;
220
+ var peg$r2 = /^[^(){}[\]<>,\/:=`"'\\# \t\n\r]/;
219
221
  var peg$r3 = /^[ \t]/;
220
222
  var peg$r4 = /^[+\-]/;
221
223
 
222
- var peg$e0 = peg$literalExpectation("=", false);
223
- var peg$e1 = peg$literalExpectation("[", false);
224
- var peg$e2 = peg$literalExpectation("]", false);
225
- var peg$e3 = peg$literalExpectation("#", false);
226
- var peg$e4 = peg$classExpectation(["\n", "\r"], true, false);
227
- var peg$e5 = peg$classExpectation([["0", "9"]], false, false);
228
- var peg$e6 = peg$literalExpectation("\"", false);
229
- var peg$e7 = peg$literalExpectation("\\", false);
230
- var peg$e8 = peg$anyExpectation();
231
- var peg$e9 = peg$otherExpectation("Origami expression");
232
- var peg$e10 = peg$literalExpectation(".", false);
233
- var peg$e11 = peg$literalExpectation("(", false);
234
- var peg$e12 = peg$literalExpectation(")", false);
235
- var peg$e13 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", "/", ":", "=", "`", "\"", "'", "\\", "#", " ", "\t", "\n", "\r"], true, false);
236
- var peg$e14 = peg$literalExpectation(":", false);
237
- var peg$e15 = peg$classExpectation([" ", "\t"], false, false);
238
- var peg$e16 = peg$literalExpectation("/", false);
239
- var peg$e17 = peg$literalExpectation("\n", false);
240
- var peg$e18 = peg$literalExpectation("\r\n", false);
241
- var peg$e19 = peg$literalExpectation("\r", false);
242
- var peg$e20 = peg$literalExpectation("{", false);
243
- var peg$e21 = peg$literalExpectation("}", false);
244
- var peg$e22 = peg$literalExpectation(",", false);
245
- var peg$e23 = peg$classExpectation(["+", "-"], false, false);
246
- var peg$e24 = peg$literalExpectation("https", false);
247
- var peg$e25 = peg$literalExpectation("http", false);
248
- var peg$e26 = peg$literalExpectation("package", false);
249
- var peg$e27 = peg$literalExpectation("treehttps", false);
250
- var peg$e28 = peg$literalExpectation("treehttp", false);
251
- var peg$e29 = peg$literalExpectation("tree", false);
252
- var peg$e30 = peg$literalExpectation("'", false);
253
- var peg$e31 = peg$otherExpectation("Origami template");
254
- var peg$e32 = peg$literalExpectation("{{", false);
255
- var peg$e33 = peg$literalExpectation("`", false);
256
- var peg$e34 = peg$literalExpectation("}}", false);
224
+ var peg$e0 = peg$otherExpectation("absolute file path");
225
+ var peg$e1 = peg$otherExpectation("function arguments");
226
+ var peg$e2 = peg$otherExpectation("tree assignment");
227
+ var peg$e3 = peg$literalExpectation("=", false);
228
+ var peg$e4 = peg$otherExpectation("array");
229
+ var peg$e5 = peg$literalExpectation("[", false);
230
+ var peg$e6 = peg$literalExpectation("]", false);
231
+ var peg$e7 = peg$otherExpectation("function call");
232
+ var peg$e8 = peg$otherExpectation("comment");
233
+ var peg$e9 = peg$literalExpectation("#", false);
234
+ var peg$e10 = peg$classExpectation(["\n", "\r"], true, false);
235
+ var peg$e11 = peg$classExpectation([["0", "9"]], false, false);
236
+ var peg$e12 = peg$otherExpectation("double quote string");
237
+ var peg$e13 = peg$literalExpectation("\"", false);
238
+ var peg$e14 = peg$otherExpectation("backslash-escaped character");
239
+ var peg$e15 = peg$literalExpectation("\\", false);
240
+ var peg$e16 = peg$anyExpectation();
241
+ var peg$e17 = peg$otherExpectation("expression");
242
+ var peg$e18 = peg$otherExpectation("Origami expression");
243
+ var peg$e19 = peg$otherExpectation("floating-point number");
244
+ var peg$e20 = peg$literalExpectation(".", false);
245
+ var peg$e21 = peg$otherExpectation("function composition");
246
+ var peg$e22 = peg$otherExpectation("parenthetical group");
247
+ var peg$e23 = peg$literalExpectation("(", false);
248
+ var peg$e24 = peg$literalExpectation(")", false);
249
+ var peg$e25 = peg$otherExpectation("identifier");
250
+ var peg$e26 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", ",", "/", ":", "=", "`", "\"", "'", "\\", "#", " ", "\t", "\n", "\r"], true, false);
251
+ var peg$e27 = peg$otherExpectation("function call with implicit parentheses");
252
+ var peg$e28 = peg$otherExpectation("HTTP/HTTPS host");
253
+ var peg$e29 = peg$literalExpectation(":", false);
254
+ var peg$e30 = peg$classExpectation([" ", "\t"], false, false);
255
+ var peg$e31 = peg$otherExpectation("integer");
256
+ var peg$e32 = peg$otherExpectation("lambda function");
257
+ var peg$e33 = peg$otherExpectation("path with a leading slash");
258
+ var peg$e34 = peg$literalExpectation("/", false);
259
+ var peg$e35 = peg$otherExpectation("list");
260
+ var peg$e36 = peg$literalExpectation("\n", false);
261
+ var peg$e37 = peg$literalExpectation("\r\n", false);
262
+ var peg$e38 = peg$literalExpectation("\r", false);
263
+ var peg$e39 = peg$otherExpectation("number");
264
+ var peg$e40 = peg$otherExpectation("object literal");
265
+ var peg$e41 = peg$literalExpectation("{", false);
266
+ var peg$e42 = peg$literalExpectation("}", false);
267
+ var peg$e43 = peg$otherExpectation("object property");
268
+ var peg$e44 = peg$literalExpectation("=>", false);
269
+ var peg$e45 = peg$literalExpectation("\u21D2", false);
270
+ var peg$e46 = peg$otherExpectation("function arguments in parentheses");
271
+ var peg$e47 = peg$literalExpectation(",", false);
272
+ var peg$e48 = peg$classExpectation(["+", "-"], false, false);
273
+ var peg$e49 = peg$otherExpectation("slash-separated path");
274
+ var peg$e50 = peg$otherExpectation("path element");
275
+ var peg$e51 = peg$otherExpectation("function call using protocol: syntax");
276
+ var peg$e52 = peg$otherExpectation("protocol");
277
+ var peg$e53 = peg$otherExpectation("reserved protocol");
278
+ var peg$e54 = peg$literalExpectation("https", false);
279
+ var peg$e55 = peg$literalExpectation("http", false);
280
+ var peg$e56 = peg$literalExpectation("package", false);
281
+ var peg$e57 = peg$literalExpectation("treehttps", false);
282
+ var peg$e58 = peg$literalExpectation("treehttp", false);
283
+ var peg$e59 = peg$literalExpectation("tree", false);
284
+ var peg$e60 = peg$otherExpectation("scope reference");
285
+ var peg$e61 = peg$otherExpectation("single quote string");
286
+ var peg$e62 = peg$literalExpectation("'", false);
287
+ var peg$e63 = peg$otherExpectation("string");
288
+ var peg$e64 = peg$otherExpectation("template");
289
+ var peg$e65 = peg$literalExpectation("{{", false);
290
+ var peg$e66 = peg$otherExpectation("template text");
291
+ var peg$e67 = peg$otherExpectation("template literal");
292
+ var peg$e68 = peg$literalExpectation("`", false);
293
+ var peg$e69 = peg$otherExpectation("template substitution");
294
+ var peg$e70 = peg$literalExpectation("}}", false);
295
+ var peg$e71 = peg$otherExpectation("tree literal");
257
296
 
258
297
  var peg$f0 = function() { return ""; };
259
298
  var peg$f1 = function(path) { return [[ops.filesRoot], ...path]; };
260
- var peg$f2 = function(parts) { return parts; };
299
+ var peg$f2 = function(path) { return [ops.traverse, ...path]; };
261
300
  var peg$f3 = function(key) { return [key, [ops.inherited, key]]; };
262
301
  var peg$f4 = function(list) { return [ops.array, ...(list ?? [])]; };
263
302
  var peg$f5 = function(chars) { return chars.join(""); };
@@ -266,43 +305,49 @@ function peg$parse(input, options) {
266
305
  };
267
306
  var peg$f7 = function(target, chain) { return makeFunctionCall(target, chain); };
268
307
  var peg$f8 = function(chars) { return chars.join(""); };
269
- var peg$f9 = function(target, args) {
308
+ var peg$f9 = function(head, tail) {
309
+ return [head].concat(tail);
310
+ };
311
+ var peg$f10 = function(target, args) {
270
312
  return [target, ...args];
271
313
  };
272
- var peg$f10 = function() { return text(); };
273
- var peg$f11 = function() {
314
+ var peg$f11 = function() { return text(); };
315
+ var peg$f12 = function() {
274
316
  return parseInt(text());
275
317
  };
276
- var peg$f12 = function(expr) { return [ops.lambda, expr]; };
277
- var peg$f13 = function() { return [""]; };
278
- var peg$f14 = function(head, tail) { return [head].concat(tail); };
279
- var peg$f15 = function(properties) { return [ops.object, ...(properties ?? [])]; };
280
- var peg$f16 = function(head, tail) {
318
+ var peg$f13 = function(expr) { return [ops.lambda, null, expr]; };
319
+ var peg$f14 = function() { return [""]; };
320
+ var peg$f15 = function(head, tail) { return [head].concat(tail); };
321
+ var peg$f16 = function(properties) { return [ops.object, ...(properties ?? [])]; };
322
+ var peg$f17 = function(head, tail) {
281
323
  return [head].concat(tail);
282
324
  };
283
- var peg$f17 = function(key) { return [key, [ops.scope, key]]; };
284
- var peg$f18 = function(list) { return list ?? [undefined]; };
285
- var peg$f19 = function(head, tail) { return [head].concat(tail); };
286
- var peg$f20 = function(key) { return [key]; };
287
- var peg$f21 = function(key) { return key.join(""); };
288
- var peg$f22 = function(protocol, host, path) {
325
+ var peg$f18 = function(key) { return [key, [ops.scope, key]]; };
326
+ var peg$f19 = function(parameters, expr) {
327
+ return [ops.lambda, parameters ?? [], expr];
328
+ };
329
+ var peg$f20 = function(list) { return list ?? [undefined]; };
330
+ var peg$f21 = function(head, tail) { return [head].concat(tail); };
331
+ var peg$f22 = function(key) { return [key]; };
332
+ var peg$f23 = function(key) { return key.join(""); };
333
+ var peg$f24 = function(protocol, host, path) {
289
334
  return [protocol, host, ...(path ?? [])];
290
335
  };
291
- var peg$f23 = function() { return ops.https; };
292
- var peg$f24 = function() { return ops.http; };
293
- var peg$f25 = function() { return [ops.scope, "@package"] };
294
- var peg$f26 = function() { return ops.treeHttps; };
295
- var peg$f27 = function() { return ops.treeHttp; };
336
+ var peg$f25 = function() { return ops.https; };
337
+ var peg$f26 = function() { return ops.http; };
338
+ var peg$f27 = function() { return [ops.scope, "@package"] };
296
339
  var peg$f28 = function() { return ops.treeHttps; };
297
- var peg$f29 = function(key) { return [ops.scope, key]; };
298
- var peg$f30 = function(chars) { return chars.join(""); };
299
- var peg$f31 = function(contents) { return [ops.lambda, contents]; };
300
- var peg$f32 = function(parts) { return makeTemplate(parts); };
301
- var peg$f33 = function(chars) { return chars.join(""); };
340
+ var peg$f29 = function() { return ops.treeHttp; };
341
+ var peg$f30 = function() { return ops.treeHttps; };
342
+ var peg$f31 = function(key) { return [ops.scope, key]; };
343
+ var peg$f32 = function(chars) { return chars.join(""); };
344
+ var peg$f33 = function(contents) { return [ops.lambda, null, contents]; };
302
345
  var peg$f34 = function(parts) { return makeTemplate(parts); };
303
346
  var peg$f35 = function(chars) { return chars.join(""); };
304
- var peg$f36 = function(assignments) { return [ops.tree, ...(assignments ?? [])]; };
305
- var peg$f37 = function(head, tail) {
347
+ var peg$f36 = function(parts) { return makeTemplate(parts); };
348
+ var peg$f37 = function(chars) { return chars.join(""); };
349
+ var peg$f38 = function(assignments) { return [ops.tree, ...(assignments ?? [])]; };
350
+ var peg$f39 = function(head, tail) {
306
351
  return [head].concat(tail);
307
352
  };
308
353
  var peg$currPos = 0;
@@ -497,6 +542,7 @@ function peg$parse(input, options) {
497
542
  function peg$parseabsoluteFilePath() {
498
543
  var s0, s1;
499
544
 
545
+ peg$silentFails++;
500
546
  s0 = peg$currPos;
501
547
  s1 = peg$parseleadingSlashPath();
502
548
  if (s1 !== peg$FAILED) {
@@ -504,35 +550,34 @@ function peg$parse(input, options) {
504
550
  s1 = peg$f1(s1);
505
551
  }
506
552
  s0 = s1;
553
+ peg$silentFails--;
554
+ if (s0 === peg$FAILED) {
555
+ s1 = peg$FAILED;
556
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
557
+ }
507
558
 
508
559
  return s0;
509
560
  }
510
561
 
511
- function peg$parseargsChain() {
512
- var s0, s1, s2;
562
+ function peg$parseargs() {
563
+ var s0, s1;
513
564
 
514
- s0 = peg$currPos;
515
- s1 = [];
516
- s2 = peg$parseparensArgs();
517
- if (s2 === peg$FAILED) {
518
- s2 = peg$parseleadingSlashPath();
519
- }
520
- if (s2 !== peg$FAILED) {
521
- while (s2 !== peg$FAILED) {
522
- s1.push(s2);
523
- s2 = peg$parseparensArgs();
524
- if (s2 === peg$FAILED) {
525
- s2 = peg$parseleadingSlashPath();
526
- }
565
+ peg$silentFails++;
566
+ s0 = peg$parseparensArgs();
567
+ if (s0 === peg$FAILED) {
568
+ s0 = peg$currPos;
569
+ s1 = peg$parseleadingSlashPath();
570
+ if (s1 !== peg$FAILED) {
571
+ peg$savedPos = s0;
572
+ s1 = peg$f2(s1);
527
573
  }
528
- } else {
529
- s1 = peg$FAILED;
574
+ s0 = s1;
530
575
  }
531
- if (s1 !== peg$FAILED) {
532
- peg$savedPos = s0;
533
- s1 = peg$f2(s1);
576
+ peg$silentFails--;
577
+ if (s0 === peg$FAILED) {
578
+ s1 = peg$FAILED;
579
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
534
580
  }
535
- s0 = s1;
536
581
 
537
582
  return s0;
538
583
  }
@@ -540,6 +585,7 @@ function peg$parse(input, options) {
540
585
  function peg$parseassignment() {
541
586
  var s0, s1, s2, s3, s4, s5;
542
587
 
588
+ peg$silentFails++;
543
589
  s0 = peg$currPos;
544
590
  s1 = peg$parseidentifier();
545
591
  if (s1 !== peg$FAILED) {
@@ -549,7 +595,7 @@ function peg$parse(input, options) {
549
595
  peg$currPos++;
550
596
  } else {
551
597
  s3 = peg$FAILED;
552
- if (peg$silentFails === 0) { peg$fail(peg$e0); }
598
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
553
599
  }
554
600
  if (s3 !== peg$FAILED) {
555
601
  s4 = peg$parse__();
@@ -568,6 +614,11 @@ function peg$parse(input, options) {
568
614
  peg$currPos = s0;
569
615
  s0 = peg$FAILED;
570
616
  }
617
+ peg$silentFails--;
618
+ if (s0 === peg$FAILED) {
619
+ s1 = peg$FAILED;
620
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
621
+ }
571
622
 
572
623
  return s0;
573
624
  }
@@ -592,13 +643,14 @@ function peg$parse(input, options) {
592
643
  function peg$parsearray() {
593
644
  var s0, s1, s2, s3, s4;
594
645
 
646
+ peg$silentFails++;
595
647
  s0 = peg$currPos;
596
648
  if (input.charCodeAt(peg$currPos) === 91) {
597
649
  s1 = peg$c1;
598
650
  peg$currPos++;
599
651
  } else {
600
652
  s1 = peg$FAILED;
601
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
653
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
602
654
  }
603
655
  if (s1 !== peg$FAILED) {
604
656
  s2 = peg$parse__();
@@ -611,7 +663,7 @@ function peg$parse(input, options) {
611
663
  peg$currPos++;
612
664
  } else {
613
665
  s4 = peg$FAILED;
614
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
666
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
615
667
  }
616
668
  if (s4 !== peg$FAILED) {
617
669
  peg$savedPos = s0;
@@ -624,13 +676,19 @@ function peg$parse(input, options) {
624
676
  peg$currPos = s0;
625
677
  s0 = peg$FAILED;
626
678
  }
679
+ peg$silentFails--;
680
+ if (s0 === peg$FAILED) {
681
+ s1 = peg$FAILED;
682
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
683
+ }
627
684
 
628
685
  return s0;
629
686
  }
630
687
 
631
688
  function peg$parsecallTarget() {
632
- var s0;
689
+ var s0, s1;
633
690
 
691
+ peg$silentFails++;
634
692
  s0 = peg$parseabsoluteFilePath();
635
693
  if (s0 === peg$FAILED) {
636
694
  s0 = peg$parsearray();
@@ -641,11 +699,14 @@ function peg$parse(input, options) {
641
699
  if (s0 === peg$FAILED) {
642
700
  s0 = peg$parselambda();
643
701
  if (s0 === peg$FAILED) {
644
- s0 = peg$parseprotocolCall();
702
+ s0 = peg$parseparameterizedLambda();
645
703
  if (s0 === peg$FAILED) {
646
- s0 = peg$parsegroup();
704
+ s0 = peg$parseprotocolCall();
647
705
  if (s0 === peg$FAILED) {
648
- s0 = peg$parsescopeReference();
706
+ s0 = peg$parsegroup();
707
+ if (s0 === peg$FAILED) {
708
+ s0 = peg$parsescopeReference();
709
+ }
649
710
  }
650
711
  }
651
712
  }
@@ -653,6 +714,11 @@ function peg$parse(input, options) {
653
714
  }
654
715
  }
655
716
  }
717
+ peg$silentFails--;
718
+ if (s0 === peg$FAILED) {
719
+ s1 = peg$FAILED;
720
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
721
+ }
656
722
 
657
723
  return s0;
658
724
  }
@@ -660,13 +726,14 @@ function peg$parse(input, options) {
660
726
  function peg$parsecomment() {
661
727
  var s0, s1, s2, s3;
662
728
 
729
+ peg$silentFails++;
663
730
  s0 = peg$currPos;
664
731
  if (input.charCodeAt(peg$currPos) === 35) {
665
732
  s1 = peg$c3;
666
733
  peg$currPos++;
667
734
  } else {
668
735
  s1 = peg$FAILED;
669
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
736
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
670
737
  }
671
738
  if (s1 !== peg$FAILED) {
672
739
  s2 = [];
@@ -675,7 +742,7 @@ function peg$parse(input, options) {
675
742
  peg$currPos++;
676
743
  } else {
677
744
  s3 = peg$FAILED;
678
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
745
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
679
746
  }
680
747
  while (s3 !== peg$FAILED) {
681
748
  s2.push(s3);
@@ -684,7 +751,7 @@ function peg$parse(input, options) {
684
751
  peg$currPos++;
685
752
  } else {
686
753
  s3 = peg$FAILED;
687
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
754
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
688
755
  }
689
756
  }
690
757
  s1 = [s1, s2];
@@ -693,6 +760,11 @@ function peg$parse(input, options) {
693
760
  peg$currPos = s0;
694
761
  s0 = peg$FAILED;
695
762
  }
763
+ peg$silentFails--;
764
+ if (s0 === peg$FAILED) {
765
+ s1 = peg$FAILED;
766
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
767
+ }
696
768
 
697
769
  return s0;
698
770
  }
@@ -707,7 +779,7 @@ function peg$parse(input, options) {
707
779
  peg$currPos++;
708
780
  } else {
709
781
  s2 = peg$FAILED;
710
- if (peg$silentFails === 0) { peg$fail(peg$e5); }
782
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
711
783
  }
712
784
  if (s2 !== peg$FAILED) {
713
785
  while (s2 !== peg$FAILED) {
@@ -717,7 +789,7 @@ function peg$parse(input, options) {
717
789
  peg$currPos++;
718
790
  } else {
719
791
  s2 = peg$FAILED;
720
- if (peg$silentFails === 0) { peg$fail(peg$e5); }
792
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
721
793
  }
722
794
  }
723
795
  } else {
@@ -736,13 +808,14 @@ function peg$parse(input, options) {
736
808
  function peg$parsedoubleQuoteString() {
737
809
  var s0, s1, s2, s3;
738
810
 
811
+ peg$silentFails++;
739
812
  s0 = peg$currPos;
740
813
  if (input.charCodeAt(peg$currPos) === 34) {
741
814
  s1 = peg$c4;
742
815
  peg$currPos++;
743
816
  } else {
744
817
  s1 = peg$FAILED;
745
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
818
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
746
819
  }
747
820
  if (s1 !== peg$FAILED) {
748
821
  s2 = [];
@@ -756,7 +829,7 @@ function peg$parse(input, options) {
756
829
  peg$currPos++;
757
830
  } else {
758
831
  s3 = peg$FAILED;
759
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
832
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
760
833
  }
761
834
  if (s3 !== peg$FAILED) {
762
835
  peg$savedPos = s0;
@@ -769,6 +842,11 @@ function peg$parse(input, options) {
769
842
  peg$currPos = s0;
770
843
  s0 = peg$FAILED;
771
844
  }
845
+ peg$silentFails--;
846
+ if (s0 === peg$FAILED) {
847
+ s1 = peg$FAILED;
848
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
849
+ }
772
850
 
773
851
  return s0;
774
852
  }
@@ -784,7 +862,7 @@ function peg$parse(input, options) {
784
862
  peg$currPos++;
785
863
  } else {
786
864
  s2 = peg$FAILED;
787
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
865
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
788
866
  }
789
867
  if (s2 === peg$FAILED) {
790
868
  s2 = peg$parsenewLine();
@@ -815,13 +893,14 @@ function peg$parse(input, options) {
815
893
  function peg$parseescapedChar() {
816
894
  var s0, s1, s2;
817
895
 
896
+ peg$silentFails++;
818
897
  s0 = peg$currPos;
819
898
  if (input.charCodeAt(peg$currPos) === 92) {
820
899
  s1 = peg$c5;
821
900
  peg$currPos++;
822
901
  } else {
823
902
  s1 = peg$FAILED;
824
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
903
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
825
904
  }
826
905
  if (s1 !== peg$FAILED) {
827
906
  if (input.length > peg$currPos) {
@@ -829,7 +908,7 @@ function peg$parse(input, options) {
829
908
  peg$currPos++;
830
909
  } else {
831
910
  s2 = peg$FAILED;
832
- if (peg$silentFails === 0) { peg$fail(peg$e8); }
911
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
833
912
  }
834
913
  if (s2 !== peg$FAILED) {
835
914
  s0 = s2;
@@ -841,13 +920,19 @@ function peg$parse(input, options) {
841
920
  peg$currPos = s0;
842
921
  s0 = peg$FAILED;
843
922
  }
923
+ peg$silentFails--;
924
+ if (s0 === peg$FAILED) {
925
+ s1 = peg$FAILED;
926
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
927
+ }
844
928
 
845
929
  return s0;
846
930
  }
847
931
 
848
932
  function peg$parseexpr() {
849
- var s0;
933
+ var s0, s1;
850
934
 
935
+ peg$silentFails++;
851
936
  s0 = peg$parseimplicitParensCall();
852
937
  if (s0 === peg$FAILED) {
853
938
  s0 = peg$parsefunctionComposition();
@@ -860,19 +945,22 @@ function peg$parse(input, options) {
860
945
  if (s0 === peg$FAILED) {
861
946
  s0 = peg$parsetree();
862
947
  if (s0 === peg$FAILED) {
863
- s0 = peg$parselambda();
948
+ s0 = peg$parsetemplateLiteral();
864
949
  if (s0 === peg$FAILED) {
865
- s0 = peg$parsetemplateLiteral();
950
+ s0 = peg$parselambda();
866
951
  if (s0 === peg$FAILED) {
867
- s0 = peg$parsegroup();
952
+ s0 = peg$parseparameterizedLambda();
868
953
  if (s0 === peg$FAILED) {
869
- s0 = peg$parsestring();
954
+ s0 = peg$parsegroup();
870
955
  if (s0 === peg$FAILED) {
871
- s0 = peg$parsenumber();
956
+ s0 = peg$parsestring();
872
957
  if (s0 === peg$FAILED) {
873
- s0 = peg$parseprotocolCall();
958
+ s0 = peg$parsenumber();
874
959
  if (s0 === peg$FAILED) {
875
- s0 = peg$parsescopeReference();
960
+ s0 = peg$parseprotocolCall();
961
+ if (s0 === peg$FAILED) {
962
+ s0 = peg$parsescopeReference();
963
+ }
876
964
  }
877
965
  }
878
966
  }
@@ -885,6 +973,11 @@ function peg$parse(input, options) {
885
973
  }
886
974
  }
887
975
  }
976
+ peg$silentFails--;
977
+ if (s0 === peg$FAILED) {
978
+ s1 = peg$FAILED;
979
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
980
+ }
888
981
 
889
982
  return s0;
890
983
  }
@@ -906,7 +999,7 @@ function peg$parse(input, options) {
906
999
  peg$silentFails--;
907
1000
  if (s0 === peg$FAILED) {
908
1001
  s1 = peg$FAILED;
909
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
1002
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
910
1003
  }
911
1004
 
912
1005
  return s0;
@@ -915,6 +1008,7 @@ function peg$parse(input, options) {
915
1008
  function peg$parsefloat() {
916
1009
  var s0, s1, s2, s3, s4;
917
1010
 
1011
+ peg$silentFails++;
918
1012
  s0 = peg$currPos;
919
1013
  s1 = peg$parsesign();
920
1014
  if (s1 === peg$FAILED) {
@@ -929,7 +1023,7 @@ function peg$parse(input, options) {
929
1023
  peg$currPos++;
930
1024
  } else {
931
1025
  s3 = peg$FAILED;
932
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
1026
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
933
1027
  }
934
1028
  if (s3 !== peg$FAILED) {
935
1029
  s4 = peg$parsedigits();
@@ -944,17 +1038,32 @@ function peg$parse(input, options) {
944
1038
  peg$currPos = s0;
945
1039
  s0 = peg$FAILED;
946
1040
  }
1041
+ peg$silentFails--;
1042
+ if (s0 === peg$FAILED) {
1043
+ s1 = peg$FAILED;
1044
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1045
+ }
947
1046
 
948
1047
  return s0;
949
1048
  }
950
1049
 
951
1050
  function peg$parsefunctionComposition() {
952
- var s0, s1, s2;
1051
+ var s0, s1, s2, s3;
953
1052
 
1053
+ peg$silentFails++;
954
1054
  s0 = peg$currPos;
955
1055
  s1 = peg$parsecallTarget();
956
1056
  if (s1 !== peg$FAILED) {
957
- s2 = peg$parseargsChain();
1057
+ s2 = [];
1058
+ s3 = peg$parseargs();
1059
+ if (s3 !== peg$FAILED) {
1060
+ while (s3 !== peg$FAILED) {
1061
+ s2.push(s3);
1062
+ s3 = peg$parseargs();
1063
+ }
1064
+ } else {
1065
+ s2 = peg$FAILED;
1066
+ }
958
1067
  if (s2 !== peg$FAILED) {
959
1068
  peg$savedPos = s0;
960
1069
  s0 = peg$f7(s1, s2);
@@ -966,6 +1075,11 @@ function peg$parse(input, options) {
966
1075
  peg$currPos = s0;
967
1076
  s0 = peg$FAILED;
968
1077
  }
1078
+ peg$silentFails--;
1079
+ if (s0 === peg$FAILED) {
1080
+ s1 = peg$FAILED;
1081
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1082
+ }
969
1083
 
970
1084
  return s0;
971
1085
  }
@@ -973,13 +1087,14 @@ function peg$parse(input, options) {
973
1087
  function peg$parsegroup() {
974
1088
  var s0, s1, s2, s3, s4, s5;
975
1089
 
1090
+ peg$silentFails++;
976
1091
  s0 = peg$currPos;
977
1092
  if (input.charCodeAt(peg$currPos) === 40) {
978
1093
  s1 = peg$c7;
979
1094
  peg$currPos++;
980
1095
  } else {
981
1096
  s1 = peg$FAILED;
982
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1097
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
983
1098
  }
984
1099
  if (s1 !== peg$FAILED) {
985
1100
  s2 = peg$parse__();
@@ -991,7 +1106,7 @@ function peg$parse(input, options) {
991
1106
  peg$currPos++;
992
1107
  } else {
993
1108
  s5 = peg$FAILED;
994
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1109
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
995
1110
  }
996
1111
  if (s5 !== peg$FAILED) {
997
1112
  s0 = s3;
@@ -1007,6 +1122,11 @@ function peg$parse(input, options) {
1007
1122
  peg$currPos = s0;
1008
1123
  s0 = peg$FAILED;
1009
1124
  }
1125
+ peg$silentFails--;
1126
+ if (s0 === peg$FAILED) {
1127
+ s1 = peg$FAILED;
1128
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1129
+ }
1010
1130
 
1011
1131
  return s0;
1012
1132
  }
@@ -1014,6 +1134,7 @@ function peg$parse(input, options) {
1014
1134
  function peg$parseidentifier() {
1015
1135
  var s0, s1, s2;
1016
1136
 
1137
+ peg$silentFails++;
1017
1138
  s0 = peg$currPos;
1018
1139
  s1 = [];
1019
1140
  s2 = peg$parseidentifierChar();
@@ -1030,6 +1151,11 @@ function peg$parse(input, options) {
1030
1151
  s1 = peg$f8(s1);
1031
1152
  }
1032
1153
  s0 = s1;
1154
+ peg$silentFails--;
1155
+ if (s0 === peg$FAILED) {
1156
+ s1 = peg$FAILED;
1157
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1158
+ }
1033
1159
 
1034
1160
  return s0;
1035
1161
  }
@@ -1042,7 +1168,7 @@ function peg$parse(input, options) {
1042
1168
  peg$currPos++;
1043
1169
  } else {
1044
1170
  s0 = peg$FAILED;
1045
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
1171
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1046
1172
  }
1047
1173
  if (s0 === peg$FAILED) {
1048
1174
  s0 = peg$parseescapedChar();
@@ -1051,9 +1177,62 @@ function peg$parse(input, options) {
1051
1177
  return s0;
1052
1178
  }
1053
1179
 
1180
+ function peg$parseidentifierList() {
1181
+ var s0, s1, s2, s3, s4, s5;
1182
+
1183
+ s0 = peg$currPos;
1184
+ s1 = peg$parseidentifier();
1185
+ if (s1 !== peg$FAILED) {
1186
+ s2 = [];
1187
+ s3 = peg$currPos;
1188
+ s4 = peg$parseseparator();
1189
+ if (s4 !== peg$FAILED) {
1190
+ s5 = peg$parseidentifier();
1191
+ if (s5 !== peg$FAILED) {
1192
+ s3 = s5;
1193
+ } else {
1194
+ peg$currPos = s3;
1195
+ s3 = peg$FAILED;
1196
+ }
1197
+ } else {
1198
+ peg$currPos = s3;
1199
+ s3 = peg$FAILED;
1200
+ }
1201
+ while (s3 !== peg$FAILED) {
1202
+ s2.push(s3);
1203
+ s3 = peg$currPos;
1204
+ s4 = peg$parseseparator();
1205
+ if (s4 !== peg$FAILED) {
1206
+ s5 = peg$parseidentifier();
1207
+ if (s5 !== peg$FAILED) {
1208
+ s3 = s5;
1209
+ } else {
1210
+ peg$currPos = s3;
1211
+ s3 = peg$FAILED;
1212
+ }
1213
+ } else {
1214
+ peg$currPos = s3;
1215
+ s3 = peg$FAILED;
1216
+ }
1217
+ }
1218
+ s3 = peg$parseseparator();
1219
+ if (s3 === peg$FAILED) {
1220
+ s3 = null;
1221
+ }
1222
+ peg$savedPos = s0;
1223
+ s0 = peg$f9(s1, s2);
1224
+ } else {
1225
+ peg$currPos = s0;
1226
+ s0 = peg$FAILED;
1227
+ }
1228
+
1229
+ return s0;
1230
+ }
1231
+
1054
1232
  function peg$parseimplicitParensCall() {
1055
1233
  var s0, s1, s2, s3;
1056
1234
 
1235
+ peg$silentFails++;
1057
1236
  s0 = peg$currPos;
1058
1237
  s1 = peg$parsefunctionComposition();
1059
1238
  if (s1 === peg$FAILED) {
@@ -1074,7 +1253,7 @@ function peg$parse(input, options) {
1074
1253
  s3 = peg$parselist();
1075
1254
  if (s3 !== peg$FAILED) {
1076
1255
  peg$savedPos = s0;
1077
- s0 = peg$f9(s1, s3);
1256
+ s0 = peg$f10(s1, s3);
1078
1257
  } else {
1079
1258
  peg$currPos = s0;
1080
1259
  s0 = peg$FAILED;
@@ -1087,6 +1266,11 @@ function peg$parse(input, options) {
1087
1266
  peg$currPos = s0;
1088
1267
  s0 = peg$FAILED;
1089
1268
  }
1269
+ peg$silentFails--;
1270
+ if (s0 === peg$FAILED) {
1271
+ s1 = peg$FAILED;
1272
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1273
+ }
1090
1274
 
1091
1275
  return s0;
1092
1276
  }
@@ -1094,6 +1278,7 @@ function peg$parse(input, options) {
1094
1278
  function peg$parsehost() {
1095
1279
  var s0, s1, s2, s3, s4;
1096
1280
 
1281
+ peg$silentFails++;
1097
1282
  s0 = peg$currPos;
1098
1283
  s1 = peg$parseidentifier();
1099
1284
  if (s1 !== peg$FAILED) {
@@ -1103,7 +1288,7 @@ function peg$parse(input, options) {
1103
1288
  peg$currPos++;
1104
1289
  } else {
1105
1290
  s3 = peg$FAILED;
1106
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1291
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1107
1292
  }
1108
1293
  if (s3 !== peg$FAILED) {
1109
1294
  s4 = peg$parsenumber();
@@ -1122,11 +1307,16 @@ function peg$parse(input, options) {
1122
1307
  s2 = null;
1123
1308
  }
1124
1309
  peg$savedPos = s0;
1125
- s0 = peg$f10();
1310
+ s0 = peg$f11();
1126
1311
  } else {
1127
1312
  peg$currPos = s0;
1128
1313
  s0 = peg$FAILED;
1129
1314
  }
1315
+ peg$silentFails--;
1316
+ if (s0 === peg$FAILED) {
1317
+ s1 = peg$FAILED;
1318
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1319
+ }
1130
1320
 
1131
1321
  return s0;
1132
1322
  }
@@ -1139,7 +1329,7 @@ function peg$parse(input, options) {
1139
1329
  peg$currPos++;
1140
1330
  } else {
1141
1331
  s0 = peg$FAILED;
1142
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1332
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1143
1333
  }
1144
1334
 
1145
1335
  return s0;
@@ -1148,6 +1338,7 @@ function peg$parse(input, options) {
1148
1338
  function peg$parseinteger() {
1149
1339
  var s0, s1, s2;
1150
1340
 
1341
+ peg$silentFails++;
1151
1342
  s0 = peg$currPos;
1152
1343
  s1 = peg$parsesign();
1153
1344
  if (s1 === peg$FAILED) {
@@ -1156,11 +1347,16 @@ function peg$parse(input, options) {
1156
1347
  s2 = peg$parsedigits();
1157
1348
  if (s2 !== peg$FAILED) {
1158
1349
  peg$savedPos = s0;
1159
- s0 = peg$f11();
1350
+ s0 = peg$f12();
1160
1351
  } else {
1161
1352
  peg$currPos = s0;
1162
1353
  s0 = peg$FAILED;
1163
1354
  }
1355
+ peg$silentFails--;
1356
+ if (s0 === peg$FAILED) {
1357
+ s1 = peg$FAILED;
1358
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1359
+ }
1164
1360
 
1165
1361
  return s0;
1166
1362
  }
@@ -1168,20 +1364,21 @@ function peg$parse(input, options) {
1168
1364
  function peg$parselambda() {
1169
1365
  var s0, s1, s2, s3;
1170
1366
 
1367
+ peg$silentFails++;
1171
1368
  s0 = peg$currPos;
1172
1369
  if (input.charCodeAt(peg$currPos) === 61) {
1173
1370
  s1 = peg$c0;
1174
1371
  peg$currPos++;
1175
1372
  } else {
1176
1373
  s1 = peg$FAILED;
1177
- if (peg$silentFails === 0) { peg$fail(peg$e0); }
1374
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
1178
1375
  }
1179
1376
  if (s1 !== peg$FAILED) {
1180
1377
  s2 = peg$parse__();
1181
1378
  s3 = peg$parseexpr();
1182
1379
  if (s3 !== peg$FAILED) {
1183
1380
  peg$savedPos = s0;
1184
- s0 = peg$f12(s3);
1381
+ s0 = peg$f13(s3);
1185
1382
  } else {
1186
1383
  peg$currPos = s0;
1187
1384
  s0 = peg$FAILED;
@@ -1190,6 +1387,11 @@ function peg$parse(input, options) {
1190
1387
  peg$currPos = s0;
1191
1388
  s0 = peg$FAILED;
1192
1389
  }
1390
+ peg$silentFails--;
1391
+ if (s0 === peg$FAILED) {
1392
+ s1 = peg$FAILED;
1393
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1394
+ }
1193
1395
 
1194
1396
  return s0;
1195
1397
  }
@@ -1197,13 +1399,14 @@ function peg$parse(input, options) {
1197
1399
  function peg$parseleadingSlashPath() {
1198
1400
  var s0, s1, s2;
1199
1401
 
1402
+ peg$silentFails++;
1200
1403
  s0 = peg$currPos;
1201
1404
  if (input.charCodeAt(peg$currPos) === 47) {
1202
1405
  s1 = peg$c10;
1203
1406
  peg$currPos++;
1204
1407
  } else {
1205
1408
  s1 = peg$FAILED;
1206
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1409
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1207
1410
  }
1208
1411
  if (s1 !== peg$FAILED) {
1209
1412
  s2 = peg$parsepath();
@@ -1224,14 +1427,19 @@ function peg$parse(input, options) {
1224
1427
  peg$currPos++;
1225
1428
  } else {
1226
1429
  s1 = peg$FAILED;
1227
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1430
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1228
1431
  }
1229
1432
  if (s1 !== peg$FAILED) {
1230
1433
  peg$savedPos = s0;
1231
- s1 = peg$f13();
1434
+ s1 = peg$f14();
1232
1435
  }
1233
1436
  s0 = s1;
1234
1437
  }
1438
+ peg$silentFails--;
1439
+ if (s0 === peg$FAILED) {
1440
+ s1 = peg$FAILED;
1441
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1442
+ }
1235
1443
 
1236
1444
  return s0;
1237
1445
  }
@@ -1239,6 +1447,7 @@ function peg$parse(input, options) {
1239
1447
  function peg$parselist() {
1240
1448
  var s0, s1, s2, s3, s4, s5;
1241
1449
 
1450
+ peg$silentFails++;
1242
1451
  s0 = peg$currPos;
1243
1452
  s1 = peg$parseexpr();
1244
1453
  if (s1 !== peg$FAILED) {
@@ -1279,11 +1488,16 @@ function peg$parse(input, options) {
1279
1488
  s3 = null;
1280
1489
  }
1281
1490
  peg$savedPos = s0;
1282
- s0 = peg$f14(s1, s2);
1491
+ s0 = peg$f15(s1, s2);
1283
1492
  } else {
1284
1493
  peg$currPos = s0;
1285
1494
  s0 = peg$FAILED;
1286
1495
  }
1496
+ peg$silentFails--;
1497
+ if (s0 === peg$FAILED) {
1498
+ s1 = peg$FAILED;
1499
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1500
+ }
1287
1501
 
1288
1502
  return s0;
1289
1503
  }
@@ -1296,7 +1510,7 @@ function peg$parse(input, options) {
1296
1510
  peg$currPos++;
1297
1511
  } else {
1298
1512
  s0 = peg$FAILED;
1299
- if (peg$silentFails === 0) { peg$fail(peg$e17); }
1513
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
1300
1514
  }
1301
1515
  if (s0 === peg$FAILED) {
1302
1516
  if (input.substr(peg$currPos, 2) === peg$c12) {
@@ -1304,7 +1518,7 @@ function peg$parse(input, options) {
1304
1518
  peg$currPos += 2;
1305
1519
  } else {
1306
1520
  s0 = peg$FAILED;
1307
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
1521
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1308
1522
  }
1309
1523
  if (s0 === peg$FAILED) {
1310
1524
  if (input.charCodeAt(peg$currPos) === 13) {
@@ -1312,7 +1526,7 @@ function peg$parse(input, options) {
1312
1526
  peg$currPos++;
1313
1527
  } else {
1314
1528
  s0 = peg$FAILED;
1315
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
1529
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1316
1530
  }
1317
1531
  }
1318
1532
  }
@@ -1321,12 +1535,18 @@ function peg$parse(input, options) {
1321
1535
  }
1322
1536
 
1323
1537
  function peg$parsenumber() {
1324
- var s0;
1538
+ var s0, s1;
1325
1539
 
1540
+ peg$silentFails++;
1326
1541
  s0 = peg$parsefloat();
1327
1542
  if (s0 === peg$FAILED) {
1328
1543
  s0 = peg$parseinteger();
1329
1544
  }
1545
+ peg$silentFails--;
1546
+ if (s0 === peg$FAILED) {
1547
+ s1 = peg$FAILED;
1548
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
1549
+ }
1330
1550
 
1331
1551
  return s0;
1332
1552
  }
@@ -1334,13 +1554,14 @@ function peg$parse(input, options) {
1334
1554
  function peg$parseobject() {
1335
1555
  var s0, s1, s2, s3, s4;
1336
1556
 
1557
+ peg$silentFails++;
1337
1558
  s0 = peg$currPos;
1338
1559
  if (input.charCodeAt(peg$currPos) === 123) {
1339
1560
  s1 = peg$c14;
1340
1561
  peg$currPos++;
1341
1562
  } else {
1342
1563
  s1 = peg$FAILED;
1343
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1564
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
1344
1565
  }
1345
1566
  if (s1 !== peg$FAILED) {
1346
1567
  s2 = peg$parse__();
@@ -1353,11 +1574,11 @@ function peg$parse(input, options) {
1353
1574
  peg$currPos++;
1354
1575
  } else {
1355
1576
  s4 = peg$FAILED;
1356
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
1577
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
1357
1578
  }
1358
1579
  if (s4 !== peg$FAILED) {
1359
1580
  peg$savedPos = s0;
1360
- s0 = peg$f15(s3);
1581
+ s0 = peg$f16(s3);
1361
1582
  } else {
1362
1583
  peg$currPos = s0;
1363
1584
  s0 = peg$FAILED;
@@ -1366,6 +1587,11 @@ function peg$parse(input, options) {
1366
1587
  peg$currPos = s0;
1367
1588
  s0 = peg$FAILED;
1368
1589
  }
1590
+ peg$silentFails--;
1591
+ if (s0 === peg$FAILED) {
1592
+ s1 = peg$FAILED;
1593
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1594
+ }
1369
1595
 
1370
1596
  return s0;
1371
1597
  }
@@ -1414,7 +1640,7 @@ function peg$parse(input, options) {
1414
1640
  }
1415
1641
  s4 = peg$parse__();
1416
1642
  peg$savedPos = s0;
1417
- s0 = peg$f16(s1, s2);
1643
+ s0 = peg$f17(s1, s2);
1418
1644
  } else {
1419
1645
  peg$currPos = s0;
1420
1646
  s0 = peg$FAILED;
@@ -1426,6 +1652,7 @@ function peg$parse(input, options) {
1426
1652
  function peg$parseobjectProperty() {
1427
1653
  var s0, s1, s2, s3, s4, s5;
1428
1654
 
1655
+ peg$silentFails++;
1429
1656
  s0 = peg$currPos;
1430
1657
  s1 = peg$parseidentifier();
1431
1658
  if (s1 !== peg$FAILED) {
@@ -1435,7 +1662,7 @@ function peg$parse(input, options) {
1435
1662
  peg$currPos++;
1436
1663
  } else {
1437
1664
  s3 = peg$FAILED;
1438
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1665
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1439
1666
  }
1440
1667
  if (s3 !== peg$FAILED) {
1441
1668
  s4 = peg$parse__();
@@ -1454,6 +1681,11 @@ function peg$parse(input, options) {
1454
1681
  peg$currPos = s0;
1455
1682
  s0 = peg$FAILED;
1456
1683
  }
1684
+ peg$silentFails--;
1685
+ if (s0 === peg$FAILED) {
1686
+ s1 = peg$FAILED;
1687
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
1688
+ }
1457
1689
 
1458
1690
  return s0;
1459
1691
  }
@@ -1467,7 +1699,7 @@ function peg$parse(input, options) {
1467
1699
  s1 = peg$parseidentifier();
1468
1700
  if (s1 !== peg$FAILED) {
1469
1701
  peg$savedPos = s0;
1470
- s1 = peg$f17(s1);
1702
+ s1 = peg$f18(s1);
1471
1703
  }
1472
1704
  s0 = s1;
1473
1705
  }
@@ -1475,16 +1707,85 @@ function peg$parse(input, options) {
1475
1707
  return s0;
1476
1708
  }
1477
1709
 
1710
+ function peg$parseparameterizedLambda() {
1711
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1712
+
1713
+ s0 = peg$currPos;
1714
+ if (input.charCodeAt(peg$currPos) === 40) {
1715
+ s1 = peg$c7;
1716
+ peg$currPos++;
1717
+ } else {
1718
+ s1 = peg$FAILED;
1719
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1720
+ }
1721
+ if (s1 !== peg$FAILED) {
1722
+ s2 = peg$parse__();
1723
+ s3 = peg$parseidentifierList();
1724
+ if (s3 === peg$FAILED) {
1725
+ s3 = null;
1726
+ }
1727
+ if (input.charCodeAt(peg$currPos) === 41) {
1728
+ s4 = peg$c8;
1729
+ peg$currPos++;
1730
+ } else {
1731
+ s4 = peg$FAILED;
1732
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1733
+ }
1734
+ if (s4 !== peg$FAILED) {
1735
+ s5 = peg$parse__();
1736
+ if (input.substr(peg$currPos, 2) === peg$c16) {
1737
+ s6 = peg$c16;
1738
+ peg$currPos += 2;
1739
+ } else {
1740
+ s6 = peg$FAILED;
1741
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
1742
+ }
1743
+ if (s6 === peg$FAILED) {
1744
+ if (input.charCodeAt(peg$currPos) === 8658) {
1745
+ s6 = peg$c17;
1746
+ peg$currPos++;
1747
+ } else {
1748
+ s6 = peg$FAILED;
1749
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
1750
+ }
1751
+ }
1752
+ if (s6 !== peg$FAILED) {
1753
+ s7 = peg$parse__();
1754
+ s8 = peg$parseexpr();
1755
+ if (s8 !== peg$FAILED) {
1756
+ peg$savedPos = s0;
1757
+ s0 = peg$f19(s3, s8);
1758
+ } else {
1759
+ peg$currPos = s0;
1760
+ s0 = peg$FAILED;
1761
+ }
1762
+ } else {
1763
+ peg$currPos = s0;
1764
+ s0 = peg$FAILED;
1765
+ }
1766
+ } else {
1767
+ peg$currPos = s0;
1768
+ s0 = peg$FAILED;
1769
+ }
1770
+ } else {
1771
+ peg$currPos = s0;
1772
+ s0 = peg$FAILED;
1773
+ }
1774
+
1775
+ return s0;
1776
+ }
1777
+
1478
1778
  function peg$parseparensArgs() {
1479
1779
  var s0, s1, s2, s3, s4;
1480
1780
 
1781
+ peg$silentFails++;
1481
1782
  s0 = peg$currPos;
1482
1783
  if (input.charCodeAt(peg$currPos) === 40) {
1483
1784
  s1 = peg$c7;
1484
1785
  peg$currPos++;
1485
1786
  } else {
1486
1787
  s1 = peg$FAILED;
1487
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1788
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1488
1789
  }
1489
1790
  if (s1 !== peg$FAILED) {
1490
1791
  s2 = peg$parse__();
@@ -1497,11 +1798,11 @@ function peg$parse(input, options) {
1497
1798
  peg$currPos++;
1498
1799
  } else {
1499
1800
  s4 = peg$FAILED;
1500
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1801
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1501
1802
  }
1502
1803
  if (s4 !== peg$FAILED) {
1503
1804
  peg$savedPos = s0;
1504
- s0 = peg$f18(s3);
1805
+ s0 = peg$f20(s3);
1505
1806
  } else {
1506
1807
  peg$currPos = s0;
1507
1808
  s0 = peg$FAILED;
@@ -1510,6 +1811,11 @@ function peg$parse(input, options) {
1510
1811
  peg$currPos = s0;
1511
1812
  s0 = peg$FAILED;
1512
1813
  }
1814
+ peg$silentFails--;
1815
+ if (s0 === peg$FAILED) {
1816
+ s1 = peg$FAILED;
1817
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
1818
+ }
1513
1819
 
1514
1820
  return s0;
1515
1821
  }
@@ -1520,11 +1826,11 @@ function peg$parse(input, options) {
1520
1826
  s0 = peg$currPos;
1521
1827
  s1 = peg$parse__();
1522
1828
  if (input.charCodeAt(peg$currPos) === 44) {
1523
- s2 = peg$c16;
1829
+ s2 = peg$c18;
1524
1830
  peg$currPos++;
1525
1831
  } else {
1526
1832
  s2 = peg$FAILED;
1527
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
1833
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
1528
1834
  }
1529
1835
  if (s2 !== peg$FAILED) {
1530
1836
  s3 = peg$parse__();
@@ -1549,7 +1855,7 @@ function peg$parse(input, options) {
1549
1855
  peg$currPos++;
1550
1856
  } else {
1551
1857
  s0 = peg$FAILED;
1552
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1858
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
1553
1859
  }
1554
1860
 
1555
1861
  return s0;
@@ -1558,6 +1864,7 @@ function peg$parse(input, options) {
1558
1864
  function peg$parsepath() {
1559
1865
  var s0, s1, s2, s3;
1560
1866
 
1867
+ peg$silentFails++;
1561
1868
  s0 = peg$currPos;
1562
1869
  s1 = peg$parsepathKey();
1563
1870
  if (input.charCodeAt(peg$currPos) === 47) {
@@ -1565,13 +1872,13 @@ function peg$parse(input, options) {
1565
1872
  peg$currPos++;
1566
1873
  } else {
1567
1874
  s2 = peg$FAILED;
1568
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1875
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1569
1876
  }
1570
1877
  if (s2 !== peg$FAILED) {
1571
1878
  s3 = peg$parsepath();
1572
1879
  if (s3 !== peg$FAILED) {
1573
1880
  peg$savedPos = s0;
1574
- s0 = peg$f19(s1, s3);
1881
+ s0 = peg$f21(s1, s3);
1575
1882
  } else {
1576
1883
  peg$currPos = s0;
1577
1884
  s0 = peg$FAILED;
@@ -1584,9 +1891,14 @@ function peg$parse(input, options) {
1584
1891
  s0 = peg$currPos;
1585
1892
  s1 = peg$parsepathKey();
1586
1893
  peg$savedPos = s0;
1587
- s1 = peg$f20(s1);
1894
+ s1 = peg$f22(s1);
1588
1895
  s0 = s1;
1589
1896
  }
1897
+ peg$silentFails--;
1898
+ if (s0 === peg$FAILED) {
1899
+ s1 = peg$FAILED;
1900
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
1901
+ }
1590
1902
 
1591
1903
  return s0;
1592
1904
  }
@@ -1594,6 +1906,7 @@ function peg$parse(input, options) {
1594
1906
  function peg$parsepathKey() {
1595
1907
  var s0, s1, s2;
1596
1908
 
1909
+ peg$silentFails++;
1597
1910
  s0 = peg$currPos;
1598
1911
  s1 = [];
1599
1912
  s2 = peg$parseidentifierChar();
@@ -1602,8 +1915,11 @@ function peg$parse(input, options) {
1602
1915
  s2 = peg$parseidentifierChar();
1603
1916
  }
1604
1917
  peg$savedPos = s0;
1605
- s1 = peg$f21(s1);
1918
+ s1 = peg$f23(s1);
1606
1919
  s0 = s1;
1920
+ peg$silentFails--;
1921
+ s1 = peg$FAILED;
1922
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
1607
1923
 
1608
1924
  return s0;
1609
1925
  }
@@ -1611,6 +1927,7 @@ function peg$parse(input, options) {
1611
1927
  function peg$parseprotocolCall() {
1612
1928
  var s0, s1, s2, s3, s4, s5;
1613
1929
 
1930
+ peg$silentFails++;
1614
1931
  s0 = peg$currPos;
1615
1932
  s1 = peg$parseprotocol();
1616
1933
  if (s1 !== peg$FAILED) {
@@ -1619,7 +1936,7 @@ function peg$parse(input, options) {
1619
1936
  peg$currPos++;
1620
1937
  } else {
1621
1938
  s2 = peg$FAILED;
1622
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1939
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1623
1940
  }
1624
1941
  if (s2 !== peg$FAILED) {
1625
1942
  s3 = [];
@@ -1628,7 +1945,7 @@ function peg$parse(input, options) {
1628
1945
  peg$currPos++;
1629
1946
  } else {
1630
1947
  s4 = peg$FAILED;
1631
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1948
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1632
1949
  }
1633
1950
  while (s4 !== peg$FAILED) {
1634
1951
  s3.push(s4);
@@ -1640,7 +1957,7 @@ function peg$parse(input, options) {
1640
1957
  peg$currPos++;
1641
1958
  } else {
1642
1959
  s4 = peg$FAILED;
1643
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1960
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1644
1961
  }
1645
1962
  }
1646
1963
  }
@@ -1651,7 +1968,7 @@ function peg$parse(input, options) {
1651
1968
  s5 = null;
1652
1969
  }
1653
1970
  peg$savedPos = s0;
1654
- s0 = peg$f22(s1, s4, s5);
1971
+ s0 = peg$f24(s1, s4, s5);
1655
1972
  } else {
1656
1973
  peg$currPos = s0;
1657
1974
  s0 = peg$FAILED;
@@ -1664,17 +1981,28 @@ function peg$parse(input, options) {
1664
1981
  peg$currPos = s0;
1665
1982
  s0 = peg$FAILED;
1666
1983
  }
1984
+ peg$silentFails--;
1985
+ if (s0 === peg$FAILED) {
1986
+ s1 = peg$FAILED;
1987
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
1988
+ }
1667
1989
 
1668
1990
  return s0;
1669
1991
  }
1670
1992
 
1671
1993
  function peg$parseprotocol() {
1672
- var s0;
1994
+ var s0, s1;
1673
1995
 
1996
+ peg$silentFails++;
1674
1997
  s0 = peg$parsereservedProtocol();
1675
1998
  if (s0 === peg$FAILED) {
1676
1999
  s0 = peg$parsescopeReference();
1677
2000
  }
2001
+ peg$silentFails--;
2002
+ if (s0 === peg$FAILED) {
2003
+ s1 = peg$FAILED;
2004
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
2005
+ }
1678
2006
 
1679
2007
  return s0;
1680
2008
  }
@@ -1682,87 +2010,88 @@ function peg$parse(input, options) {
1682
2010
  function peg$parsereservedProtocol() {
1683
2011
  var s0, s1;
1684
2012
 
2013
+ peg$silentFails++;
1685
2014
  s0 = peg$currPos;
1686
- if (input.substr(peg$currPos, 5) === peg$c17) {
1687
- s1 = peg$c17;
2015
+ if (input.substr(peg$currPos, 5) === peg$c19) {
2016
+ s1 = peg$c19;
1688
2017
  peg$currPos += 5;
1689
2018
  } else {
1690
2019
  s1 = peg$FAILED;
1691
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
2020
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
1692
2021
  }
1693
2022
  if (s1 !== peg$FAILED) {
1694
2023
  peg$savedPos = s0;
1695
- s1 = peg$f23();
2024
+ s1 = peg$f25();
1696
2025
  }
1697
2026
  s0 = s1;
1698
2027
  if (s0 === peg$FAILED) {
1699
2028
  s0 = peg$currPos;
1700
- if (input.substr(peg$currPos, 4) === peg$c18) {
1701
- s1 = peg$c18;
2029
+ if (input.substr(peg$currPos, 4) === peg$c20) {
2030
+ s1 = peg$c20;
1702
2031
  peg$currPos += 4;
1703
2032
  } else {
1704
2033
  s1 = peg$FAILED;
1705
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
2034
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
1706
2035
  }
1707
2036
  if (s1 !== peg$FAILED) {
1708
2037
  peg$savedPos = s0;
1709
- s1 = peg$f24();
2038
+ s1 = peg$f26();
1710
2039
  }
1711
2040
  s0 = s1;
1712
2041
  if (s0 === peg$FAILED) {
1713
2042
  s0 = peg$currPos;
1714
- if (input.substr(peg$currPos, 7) === peg$c19) {
1715
- s1 = peg$c19;
2043
+ if (input.substr(peg$currPos, 7) === peg$c21) {
2044
+ s1 = peg$c21;
1716
2045
  peg$currPos += 7;
1717
2046
  } else {
1718
2047
  s1 = peg$FAILED;
1719
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
2048
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
1720
2049
  }
1721
2050
  if (s1 !== peg$FAILED) {
1722
2051
  peg$savedPos = s0;
1723
- s1 = peg$f25();
2052
+ s1 = peg$f27();
1724
2053
  }
1725
2054
  s0 = s1;
1726
2055
  if (s0 === peg$FAILED) {
1727
2056
  s0 = peg$currPos;
1728
- if (input.substr(peg$currPos, 9) === peg$c20) {
1729
- s1 = peg$c20;
2057
+ if (input.substr(peg$currPos, 9) === peg$c22) {
2058
+ s1 = peg$c22;
1730
2059
  peg$currPos += 9;
1731
2060
  } else {
1732
2061
  s1 = peg$FAILED;
1733
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
2062
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
1734
2063
  }
1735
2064
  if (s1 !== peg$FAILED) {
1736
2065
  peg$savedPos = s0;
1737
- s1 = peg$f26();
2066
+ s1 = peg$f28();
1738
2067
  }
1739
2068
  s0 = s1;
1740
2069
  if (s0 === peg$FAILED) {
1741
2070
  s0 = peg$currPos;
1742
- if (input.substr(peg$currPos, 8) === peg$c21) {
1743
- s1 = peg$c21;
2071
+ if (input.substr(peg$currPos, 8) === peg$c23) {
2072
+ s1 = peg$c23;
1744
2073
  peg$currPos += 8;
1745
2074
  } else {
1746
2075
  s1 = peg$FAILED;
1747
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
2076
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
1748
2077
  }
1749
2078
  if (s1 !== peg$FAILED) {
1750
2079
  peg$savedPos = s0;
1751
- s1 = peg$f27();
2080
+ s1 = peg$f29();
1752
2081
  }
1753
2082
  s0 = s1;
1754
2083
  if (s0 === peg$FAILED) {
1755
2084
  s0 = peg$currPos;
1756
- if (input.substr(peg$currPos, 4) === peg$c22) {
1757
- s1 = peg$c22;
2085
+ if (input.substr(peg$currPos, 4) === peg$c24) {
2086
+ s1 = peg$c24;
1758
2087
  peg$currPos += 4;
1759
2088
  } else {
1760
2089
  s1 = peg$FAILED;
1761
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
2090
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
1762
2091
  }
1763
2092
  if (s1 !== peg$FAILED) {
1764
2093
  peg$savedPos = s0;
1765
- s1 = peg$f28();
2094
+ s1 = peg$f30();
1766
2095
  }
1767
2096
  s0 = s1;
1768
2097
  }
@@ -1770,6 +2099,11 @@ function peg$parse(input, options) {
1770
2099
  }
1771
2100
  }
1772
2101
  }
2102
+ peg$silentFails--;
2103
+ if (s0 === peg$FAILED) {
2104
+ s1 = peg$FAILED;
2105
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2106
+ }
1773
2107
 
1774
2108
  return s0;
1775
2109
  }
@@ -1777,13 +2111,19 @@ function peg$parse(input, options) {
1777
2111
  function peg$parsescopeReference() {
1778
2112
  var s0, s1;
1779
2113
 
2114
+ peg$silentFails++;
1780
2115
  s0 = peg$currPos;
1781
2116
  s1 = peg$parseidentifier();
1782
2117
  if (s1 !== peg$FAILED) {
1783
2118
  peg$savedPos = s0;
1784
- s1 = peg$f29(s1);
2119
+ s1 = peg$f31(s1);
1785
2120
  }
1786
2121
  s0 = s1;
2122
+ peg$silentFails--;
2123
+ if (s0 === peg$FAILED) {
2124
+ s1 = peg$FAILED;
2125
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
2126
+ }
1787
2127
 
1788
2128
  return s0;
1789
2129
  }
@@ -1791,13 +2131,14 @@ function peg$parse(input, options) {
1791
2131
  function peg$parsesingleQuoteString() {
1792
2132
  var s0, s1, s2, s3;
1793
2133
 
2134
+ peg$silentFails++;
1794
2135
  s0 = peg$currPos;
1795
2136
  if (input.charCodeAt(peg$currPos) === 39) {
1796
- s1 = peg$c23;
2137
+ s1 = peg$c25;
1797
2138
  peg$currPos++;
1798
2139
  } else {
1799
2140
  s1 = peg$FAILED;
1800
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
2141
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
1801
2142
  }
1802
2143
  if (s1 !== peg$FAILED) {
1803
2144
  s2 = [];
@@ -1807,15 +2148,15 @@ function peg$parse(input, options) {
1807
2148
  s3 = peg$parsesingleQuoteStringChar();
1808
2149
  }
1809
2150
  if (input.charCodeAt(peg$currPos) === 39) {
1810
- s3 = peg$c23;
2151
+ s3 = peg$c25;
1811
2152
  peg$currPos++;
1812
2153
  } else {
1813
2154
  s3 = peg$FAILED;
1814
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
2155
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
1815
2156
  }
1816
2157
  if (s3 !== peg$FAILED) {
1817
2158
  peg$savedPos = s0;
1818
- s0 = peg$f30(s2);
2159
+ s0 = peg$f32(s2);
1819
2160
  } else {
1820
2161
  peg$currPos = s0;
1821
2162
  s0 = peg$FAILED;
@@ -1824,6 +2165,11 @@ function peg$parse(input, options) {
1824
2165
  peg$currPos = s0;
1825
2166
  s0 = peg$FAILED;
1826
2167
  }
2168
+ peg$silentFails--;
2169
+ if (s0 === peg$FAILED) {
2170
+ s1 = peg$FAILED;
2171
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
2172
+ }
1827
2173
 
1828
2174
  return s0;
1829
2175
  }
@@ -1835,11 +2181,11 @@ function peg$parse(input, options) {
1835
2181
  s1 = peg$currPos;
1836
2182
  peg$silentFails++;
1837
2183
  if (input.charCodeAt(peg$currPos) === 39) {
1838
- s2 = peg$c23;
2184
+ s2 = peg$c25;
1839
2185
  peg$currPos++;
1840
2186
  } else {
1841
2187
  s2 = peg$FAILED;
1842
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
2188
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
1843
2189
  }
1844
2190
  if (s2 === peg$FAILED) {
1845
2191
  s2 = peg$parsenewLine();
@@ -1876,12 +2222,18 @@ function peg$parse(input, options) {
1876
2222
  }
1877
2223
 
1878
2224
  function peg$parsestring() {
1879
- var s0;
2225
+ var s0, s1;
1880
2226
 
2227
+ peg$silentFails++;
1881
2228
  s0 = peg$parsedoubleQuoteString();
1882
2229
  if (s0 === peg$FAILED) {
1883
2230
  s0 = peg$parsesingleQuoteString();
1884
2231
  }
2232
+ peg$silentFails--;
2233
+ if (s0 === peg$FAILED) {
2234
+ s1 = peg$FAILED;
2235
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
2236
+ }
1885
2237
 
1886
2238
  return s0;
1887
2239
  }
@@ -1893,11 +2245,11 @@ function peg$parse(input, options) {
1893
2245
  s0 = peg$currPos;
1894
2246
  s1 = peg$parsetemplateDocumentContents();
1895
2247
  peg$savedPos = s0;
1896
- s1 = peg$f31(s1);
2248
+ s1 = peg$f33(s1);
1897
2249
  s0 = s1;
1898
2250
  peg$silentFails--;
1899
2251
  s1 = peg$FAILED;
1900
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2252
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
1901
2253
 
1902
2254
  return s0;
1903
2255
  }
@@ -1908,12 +2260,12 @@ function peg$parse(input, options) {
1908
2260
  s0 = peg$currPos;
1909
2261
  s1 = peg$currPos;
1910
2262
  peg$silentFails++;
1911
- if (input.substr(peg$currPos, 2) === peg$c24) {
1912
- s2 = peg$c24;
2263
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2264
+ s2 = peg$c26;
1913
2265
  peg$currPos += 2;
1914
2266
  } else {
1915
2267
  s2 = peg$FAILED;
1916
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2268
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
1917
2269
  }
1918
2270
  peg$silentFails--;
1919
2271
  if (s2 === peg$FAILED) {
@@ -1955,7 +2307,7 @@ function peg$parse(input, options) {
1955
2307
  }
1956
2308
  }
1957
2309
  peg$savedPos = s0;
1958
- s1 = peg$f32(s1);
2310
+ s1 = peg$f34(s1);
1959
2311
  s0 = s1;
1960
2312
 
1961
2313
  return s0;
@@ -1964,6 +2316,7 @@ function peg$parse(input, options) {
1964
2316
  function peg$parsetemplateDocumentText() {
1965
2317
  var s0, s1, s2;
1966
2318
 
2319
+ peg$silentFails++;
1967
2320
  s0 = peg$currPos;
1968
2321
  s1 = [];
1969
2322
  s2 = peg$parsetemplateDocumentChar();
@@ -1977,9 +2330,14 @@ function peg$parse(input, options) {
1977
2330
  }
1978
2331
  if (s1 !== peg$FAILED) {
1979
2332
  peg$savedPos = s0;
1980
- s1 = peg$f33(s1);
2333
+ s1 = peg$f35(s1);
1981
2334
  }
1982
2335
  s0 = s1;
2336
+ peg$silentFails--;
2337
+ if (s0 === peg$FAILED) {
2338
+ s1 = peg$FAILED;
2339
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2340
+ }
1983
2341
 
1984
2342
  return s0;
1985
2343
  }
@@ -1987,22 +2345,23 @@ function peg$parse(input, options) {
1987
2345
  function peg$parsetemplateLiteral() {
1988
2346
  var s0, s1, s2, s3;
1989
2347
 
2348
+ peg$silentFails++;
1990
2349
  s0 = peg$currPos;
1991
2350
  if (input.charCodeAt(peg$currPos) === 96) {
1992
- s1 = peg$c25;
2351
+ s1 = peg$c27;
1993
2352
  peg$currPos++;
1994
2353
  } else {
1995
2354
  s1 = peg$FAILED;
1996
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
2355
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
1997
2356
  }
1998
2357
  if (s1 !== peg$FAILED) {
1999
2358
  s2 = peg$parsetemplateLiteralContents();
2000
2359
  if (input.charCodeAt(peg$currPos) === 96) {
2001
- s3 = peg$c25;
2360
+ s3 = peg$c27;
2002
2361
  peg$currPos++;
2003
2362
  } else {
2004
2363
  s3 = peg$FAILED;
2005
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
2364
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2006
2365
  }
2007
2366
  if (s3 !== peg$FAILED) {
2008
2367
  s0 = s2;
@@ -2014,6 +2373,11 @@ function peg$parse(input, options) {
2014
2373
  peg$currPos = s0;
2015
2374
  s0 = peg$FAILED;
2016
2375
  }
2376
+ peg$silentFails--;
2377
+ if (s0 === peg$FAILED) {
2378
+ s1 = peg$FAILED;
2379
+ if (peg$silentFails === 0) { peg$fail(peg$e67); }
2380
+ }
2017
2381
 
2018
2382
  return s0;
2019
2383
  }
@@ -2025,19 +2389,19 @@ function peg$parse(input, options) {
2025
2389
  s1 = peg$currPos;
2026
2390
  peg$silentFails++;
2027
2391
  if (input.charCodeAt(peg$currPos) === 96) {
2028
- s2 = peg$c25;
2392
+ s2 = peg$c27;
2029
2393
  peg$currPos++;
2030
2394
  } else {
2031
2395
  s2 = peg$FAILED;
2032
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
2396
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2033
2397
  }
2034
2398
  if (s2 === peg$FAILED) {
2035
- if (input.substr(peg$currPos, 2) === peg$c24) {
2036
- s2 = peg$c24;
2399
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2400
+ s2 = peg$c26;
2037
2401
  peg$currPos += 2;
2038
2402
  } else {
2039
2403
  s2 = peg$FAILED;
2040
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2404
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2041
2405
  }
2042
2406
  }
2043
2407
  peg$silentFails--;
@@ -2080,7 +2444,7 @@ function peg$parse(input, options) {
2080
2444
  }
2081
2445
  }
2082
2446
  peg$savedPos = s0;
2083
- s1 = peg$f34(s1);
2447
+ s1 = peg$f36(s1);
2084
2448
  s0 = s1;
2085
2449
 
2086
2450
  return s0;
@@ -2102,7 +2466,7 @@ function peg$parse(input, options) {
2102
2466
  }
2103
2467
  if (s1 !== peg$FAILED) {
2104
2468
  peg$savedPos = s0;
2105
- s1 = peg$f35(s1);
2469
+ s1 = peg$f37(s1);
2106
2470
  }
2107
2471
  s0 = s1;
2108
2472
 
@@ -2112,23 +2476,24 @@ function peg$parse(input, options) {
2112
2476
  function peg$parsetemplateSubstitution() {
2113
2477
  var s0, s1, s2, s3;
2114
2478
 
2479
+ peg$silentFails++;
2115
2480
  s0 = peg$currPos;
2116
- if (input.substr(peg$currPos, 2) === peg$c24) {
2117
- s1 = peg$c24;
2481
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2482
+ s1 = peg$c26;
2118
2483
  peg$currPos += 2;
2119
2484
  } else {
2120
2485
  s1 = peg$FAILED;
2121
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2486
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2122
2487
  }
2123
2488
  if (s1 !== peg$FAILED) {
2124
2489
  s2 = peg$parseexpression();
2125
2490
  if (s2 !== peg$FAILED) {
2126
- if (input.substr(peg$currPos, 2) === peg$c26) {
2127
- s3 = peg$c26;
2491
+ if (input.substr(peg$currPos, 2) === peg$c28) {
2492
+ s3 = peg$c28;
2128
2493
  peg$currPos += 2;
2129
2494
  } else {
2130
2495
  s3 = peg$FAILED;
2131
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2496
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
2132
2497
  }
2133
2498
  if (s3 !== peg$FAILED) {
2134
2499
  s0 = s2;
@@ -2144,6 +2509,11 @@ function peg$parse(input, options) {
2144
2509
  peg$currPos = s0;
2145
2510
  s0 = peg$FAILED;
2146
2511
  }
2512
+ peg$silentFails--;
2513
+ if (s0 === peg$FAILED) {
2514
+ s1 = peg$FAILED;
2515
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
2516
+ }
2147
2517
 
2148
2518
  return s0;
2149
2519
  }
@@ -2158,7 +2528,7 @@ function peg$parse(input, options) {
2158
2528
  peg$currPos++;
2159
2529
  } else {
2160
2530
  s0 = peg$FAILED;
2161
- if (peg$silentFails === 0) { peg$fail(peg$e8); }
2531
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
2162
2532
  }
2163
2533
  }
2164
2534
 
@@ -2168,13 +2538,14 @@ function peg$parse(input, options) {
2168
2538
  function peg$parsetree() {
2169
2539
  var s0, s1, s2, s3, s4;
2170
2540
 
2541
+ peg$silentFails++;
2171
2542
  s0 = peg$currPos;
2172
2543
  if (input.charCodeAt(peg$currPos) === 123) {
2173
2544
  s1 = peg$c14;
2174
2545
  peg$currPos++;
2175
2546
  } else {
2176
2547
  s1 = peg$FAILED;
2177
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
2548
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2178
2549
  }
2179
2550
  if (s1 !== peg$FAILED) {
2180
2551
  s2 = peg$parse__();
@@ -2187,11 +2558,11 @@ function peg$parse(input, options) {
2187
2558
  peg$currPos++;
2188
2559
  } else {
2189
2560
  s4 = peg$FAILED;
2190
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
2561
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
2191
2562
  }
2192
2563
  if (s4 !== peg$FAILED) {
2193
2564
  peg$savedPos = s0;
2194
- s0 = peg$f36(s3);
2565
+ s0 = peg$f38(s3);
2195
2566
  } else {
2196
2567
  peg$currPos = s0;
2197
2568
  s0 = peg$FAILED;
@@ -2200,6 +2571,11 @@ function peg$parse(input, options) {
2200
2571
  peg$currPos = s0;
2201
2572
  s0 = peg$FAILED;
2202
2573
  }
2574
+ peg$silentFails--;
2575
+ if (s0 === peg$FAILED) {
2576
+ s1 = peg$FAILED;
2577
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2578
+ }
2203
2579
 
2204
2580
  return s0;
2205
2581
  }
@@ -2248,7 +2624,7 @@ function peg$parse(input, options) {
2248
2624
  }
2249
2625
  s4 = peg$parse__();
2250
2626
  peg$savedPos = s0;
2251
- s0 = peg$f37(s1, s2);
2627
+ s0 = peg$f39(s1, s2);
2252
2628
  } else {
2253
2629
  peg$currPos = s0;
2254
2630
  s0 = peg$FAILED;