@weborigami/language 0.2.6 → 0.2.8

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.
@@ -202,7 +202,7 @@ function peg$parse(input, options) {
202
202
  var peg$FAILED = {};
203
203
  var peg$source = options.grammarSource;
204
204
 
205
- var peg$startRuleFunctions = { __: peg$parse__, additiveExpression: peg$parseadditiveExpression, additiveOperator: peg$parseadditiveOperator, arguments: peg$parsearguments, arrayLiteral: peg$parsearrayLiteral, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, arrowFunction: peg$parsearrowFunction, bitwiseAndExpression: peg$parsebitwiseAndExpression, bitwiseAndOperator: peg$parsebitwiseAndOperator, bitwiseOrExpression: peg$parsebitwiseOrExpression, bitwiseOrOperator: peg$parsebitwiseOrOperator, bitwiseXorExpression: peg$parsebitwiseXorExpression, bitwiseXorOperator: peg$parsebitwiseXorOperator, callExpression: peg$parsecallExpression, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParenthesis: peg$parseclosingParenthesis, commaExpression: peg$parsecommaExpression, comment: peg$parsecomment, conditionalExpression: peg$parseconditionalExpression, digits: peg$parsedigits, doubleArrow: peg$parsedoubleArrow, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, ellipsis: peg$parseellipsis, equalityExpression: peg$parseequalityExpression, equalityOperator: peg$parseequalityOperator, escapedChar: peg$parseescapedChar, exponentiationExpression: peg$parseexponentiationExpression, expression: peg$parseexpression, floatLiteral: peg$parsefloatLiteral, group: peg$parsegroup, guillemetString: peg$parseguillemetString, guillemetStringChar: peg$parseguillemetStringChar, homeDirectory: peg$parsehomeDirectory, host: peg$parsehost, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParenthesesCallExpression: peg$parseimplicitParenthesesCallExpression, implicitParensthesesArguments: peg$parseimplicitParensthesesArguments, inlineSpace: peg$parseinlineSpace, integerLiteral: peg$parseintegerLiteral, list: peg$parselist, literal: peg$parseliteral, logicalAndExpression: peg$parselogicalAndExpression, logicalOrExpression: peg$parselogicalOrExpression, multiLineComment: peg$parsemultiLineComment, multiplicativeExpression: peg$parsemultiplicativeExpression, multiplicativeOperator: peg$parsemultiplicativeOperator, namespace: peg$parsenamespace, newLine: peg$parsenewLine, numericLiteral: peg$parsenumericLiteral, nullishCoalescingExpression: peg$parsenullishCoalescingExpression, objectLiteral: peg$parseobjectLiteral, objectEntries: peg$parseobjectEntries, objectEntry: peg$parseobjectEntry, objectGetter: peg$parseobjectGetter, objectHiddenKey: peg$parseobjectHiddenKey, objectKey: peg$parseobjectKey, objectProperty: peg$parseobjectProperty, objectShorthandProperty: peg$parseobjectShorthandProperty, objectPublicKey: peg$parseobjectPublicKey, parenthesesArguments: peg$parseparenthesesArguments, path: peg$parsepath, pathArguments: peg$parsepathArguments, pathKey: peg$parsepathKey, pathSegment: peg$parsepathSegment, pathSegmentChar: peg$parsepathSegmentChar, pipelineExpression: peg$parsepipelineExpression, primary: peg$parseprimary, program: peg$parseprogram, protocolExpression: peg$parseprotocolExpression, qualifiedReference: peg$parsequalifiedReference, reference: peg$parsereference, relationalExpression: peg$parserelationalExpression, relationalOperator: peg$parserelationalOperator, rootDirectory: peg$parserootDirectory, scopeReference: peg$parsescopeReference, separator: peg$parseseparator, slashFollows: peg$parseslashFollows, shebang: peg$parseshebang, shiftExpression: peg$parseshiftExpression, shiftOperator: peg$parseshiftOperator, shorthandFunction: peg$parseshorthandFunction, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, spreadElement: peg$parsespreadElement, stringLiteral: peg$parsestringLiteral, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, unaryExpression: peg$parseunaryExpression, unaryOperator: peg$parseunaryOperator, whitespace: peg$parsewhitespace, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
205
+ var peg$startRuleFunctions = { __: peg$parse__, additiveExpression: peg$parseadditiveExpression, additiveOperator: peg$parseadditiveOperator, arguments: peg$parsearguments, arrayLiteral: peg$parsearrayLiteral, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, arrowFunction: peg$parsearrowFunction, bitwiseAndExpression: peg$parsebitwiseAndExpression, bitwiseAndOperator: peg$parsebitwiseAndOperator, bitwiseOrExpression: peg$parsebitwiseOrExpression, bitwiseOrOperator: peg$parsebitwiseOrOperator, bitwiseXorExpression: peg$parsebitwiseXorExpression, bitwiseXorOperator: peg$parsebitwiseXorOperator, callExpression: peg$parsecallExpression, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParenthesis: peg$parseclosingParenthesis, commaExpression: peg$parsecommaExpression, comment: peg$parsecomment, conditionalExpression: peg$parseconditionalExpression, digits: peg$parsedigits, doubleArrow: peg$parsedoubleArrow, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, ellipsis: peg$parseellipsis, equalityExpression: peg$parseequalityExpression, equalityOperator: peg$parseequalityOperator, escapedChar: peg$parseescapedChar, exponentiationExpression: peg$parseexponentiationExpression, expression: peg$parseexpression, floatLiteral: peg$parsefloatLiteral, group: peg$parsegroup, guillemetString: peg$parseguillemetString, guillemetStringChar: peg$parseguillemetStringChar, homeDirectory: peg$parsehomeDirectory, host: peg$parsehost, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParenthesesCallExpression: peg$parseimplicitParenthesesCallExpression, implicitParensthesesArguments: peg$parseimplicitParensthesesArguments, inlineSpace: peg$parseinlineSpace, integerLiteral: peg$parseintegerLiteral, list: peg$parselist, literal: peg$parseliteral, logicalAndExpression: peg$parselogicalAndExpression, logicalOrExpression: peg$parselogicalOrExpression, multiLineComment: peg$parsemultiLineComment, multiplicativeExpression: peg$parsemultiplicativeExpression, multiplicativeOperator: peg$parsemultiplicativeOperator, namespace: peg$parsenamespace, newLine: peg$parsenewLine, numericLiteral: peg$parsenumericLiteral, nullishCoalescingExpression: peg$parsenullishCoalescingExpression, objectLiteral: peg$parseobjectLiteral, objectEntries: peg$parseobjectEntries, objectEntry: peg$parseobjectEntry, objectGetter: peg$parseobjectGetter, objectHiddenKey: peg$parseobjectHiddenKey, objectKey: peg$parseobjectKey, objectProperty: peg$parseobjectProperty, objectShorthandProperty: peg$parseobjectShorthandProperty, objectPublicKey: peg$parseobjectPublicKey, parenthesesArguments: peg$parseparenthesesArguments, path: peg$parsepath, pathArguments: peg$parsepathArguments, pathKey: peg$parsepathKey, pathSegment: peg$parsepathSegment, pathSegmentChar: peg$parsepathSegmentChar, pipelineExpression: peg$parsepipelineExpression, primary: peg$parseprimary, program: peg$parseprogram, protocolExpression: peg$parseprotocolExpression, qualifiedReference: peg$parsequalifiedReference, inherited: peg$parseinherited, relationalExpression: peg$parserelationalExpression, relationalOperator: peg$parserelationalOperator, rootDirectory: peg$parserootDirectory, scopeReference: peg$parsescopeReference, separator: peg$parseseparator, shebang: peg$parseshebang, shiftExpression: peg$parseshiftExpression, shiftOperator: peg$parseshiftOperator, shorthandFunction: peg$parseshorthandFunction, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, slash: peg$parseslash, slashFollows: peg$parseslashFollows, spreadElement: peg$parsespreadElement, stringLiteral: peg$parsestringLiteral, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, unaryExpression: peg$parseunaryExpression, unaryOperator: peg$parseunaryOperator, whitespace: peg$parsewhitespace, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
206
206
  var peg$startRuleFunction = peg$parse__;
207
207
 
208
208
  var peg$c0 = "[";
@@ -244,27 +244,26 @@ function peg$parse(input, options) {
244
244
  var peg$c36 = "||";
245
245
  var peg$c37 = "/*";
246
246
  var peg$c38 = "*/";
247
- var peg$c39 = "@";
248
- var peg$c40 = "\n";
249
- var peg$c41 = "\r\n";
250
- var peg$c42 = "\r";
251
- var peg$c43 = "??";
252
- var peg$c44 = "{";
253
- var peg$c45 = "=";
254
- var peg$c46 = "/";
255
- var peg$c47 = "//";
256
- var peg$c48 = "<=";
257
- var peg$c49 = "<";
258
- var peg$c50 = ">=";
259
- var peg$c51 = "#!";
260
- var peg$c52 = "<<";
261
- var peg$c53 = ">>>";
262
- var peg$c54 = ">>";
263
- var peg$c55 = "\u2192";
264
- var peg$c56 = "->";
265
- var peg$c57 = "'";
266
- var peg$c58 = "${";
267
- var peg$c59 = "`";
247
+ var peg$c39 = "\n";
248
+ var peg$c40 = "\r\n";
249
+ var peg$c41 = "\r";
250
+ var peg$c42 = "??";
251
+ var peg$c43 = "{";
252
+ var peg$c44 = "=";
253
+ var peg$c45 = "/";
254
+ var peg$c46 = "//";
255
+ var peg$c47 = "<=";
256
+ var peg$c48 = "<";
257
+ var peg$c49 = ">=";
258
+ var peg$c50 = "#!";
259
+ var peg$c51 = "<<";
260
+ var peg$c52 = ">>>";
261
+ var peg$c53 = ">>";
262
+ var peg$c54 = "\u2192";
263
+ var peg$c55 = "->";
264
+ var peg$c56 = "'";
265
+ var peg$c57 = "${";
266
+ var peg$c58 = "`";
268
267
 
269
268
  var peg$r0 = /^[+\-]/;
270
269
  var peg$r1 = /^[0-9]/;
@@ -335,57 +334,56 @@ function peg$parse(input, options) {
335
334
  var peg$e56 = peg$literalExpectation("/*", false);
336
335
  var peg$e57 = peg$literalExpectation("*/", false);
337
336
  var peg$e58 = peg$classExpectation(["%", "*", "/"], false, false);
338
- var peg$e59 = peg$literalExpectation("@", false);
339
- var peg$e60 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
340
- var peg$e61 = peg$literalExpectation("\n", false);
341
- var peg$e62 = peg$literalExpectation("\r\n", false);
342
- var peg$e63 = peg$literalExpectation("\r", false);
343
- var peg$e64 = peg$otherExpectation("number");
344
- var peg$e65 = peg$literalExpectation("??", false);
345
- var peg$e66 = peg$otherExpectation("object literal");
346
- var peg$e67 = peg$literalExpectation("{", false);
347
- var peg$e68 = peg$otherExpectation("object getter");
348
- var peg$e69 = peg$literalExpectation("=", false);
349
- var peg$e70 = peg$otherExpectation("object key");
350
- var peg$e71 = peg$otherExpectation("object property");
351
- var peg$e72 = peg$otherExpectation("object identifier");
352
- var peg$e73 = peg$literalExpectation("/", false);
353
- var peg$e74 = peg$otherExpectation("function arguments in parentheses");
354
- var peg$e75 = peg$otherExpectation("slash-separated path");
355
- var peg$e76 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
356
- var peg$e77 = peg$otherExpectation("Origami program");
357
- var peg$e78 = peg$literalExpectation("//", false);
358
- var peg$e79 = peg$literalExpectation("<=", false);
359
- var peg$e80 = peg$literalExpectation("<", false);
360
- var peg$e81 = peg$literalExpectation(">=", false);
361
- var peg$e82 = peg$otherExpectation("scope reference");
362
- var peg$e83 = peg$literalExpectation("#!", false);
363
- var peg$e84 = peg$classExpectation(["\n", "\r"], true, false);
364
- var peg$e85 = peg$literalExpectation("<<", false);
365
- var peg$e86 = peg$literalExpectation(">>>", false);
366
- var peg$e87 = peg$literalExpectation(">>", false);
367
- var peg$e88 = peg$otherExpectation("lambda function");
368
- var peg$e89 = peg$literalExpectation("\u2192", false);
369
- var peg$e90 = peg$literalExpectation("->", false);
370
- var peg$e91 = peg$otherExpectation("single quote string");
371
- var peg$e92 = peg$literalExpectation("'", false);
372
- var peg$e93 = peg$otherExpectation("string");
373
- var peg$e94 = peg$otherExpectation("template");
374
- var peg$e95 = peg$literalExpectation("${", false);
375
- var peg$e96 = peg$otherExpectation("template text");
376
- var peg$e97 = peg$otherExpectation("template literal");
377
- var peg$e98 = peg$literalExpectation("`", false);
378
- var peg$e99 = peg$otherExpectation("template substitution");
379
- var peg$e100 = peg$classExpectation(["!", "+", "-", "~"], false, false);
337
+ var peg$e59 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
338
+ var peg$e60 = peg$literalExpectation("\n", false);
339
+ var peg$e61 = peg$literalExpectation("\r\n", false);
340
+ var peg$e62 = peg$literalExpectation("\r", false);
341
+ var peg$e63 = peg$otherExpectation("number");
342
+ var peg$e64 = peg$literalExpectation("??", false);
343
+ var peg$e65 = peg$otherExpectation("object literal");
344
+ var peg$e66 = peg$literalExpectation("{", false);
345
+ var peg$e67 = peg$otherExpectation("object getter");
346
+ var peg$e68 = peg$literalExpectation("=", false);
347
+ var peg$e69 = peg$otherExpectation("object key");
348
+ var peg$e70 = peg$otherExpectation("object property");
349
+ var peg$e71 = peg$otherExpectation("object identifier");
350
+ var peg$e72 = peg$literalExpectation("/", false);
351
+ var peg$e73 = peg$otherExpectation("function arguments in parentheses");
352
+ var peg$e74 = peg$otherExpectation("slash-separated path");
353
+ var peg$e75 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
354
+ var peg$e76 = peg$otherExpectation("Origami program");
355
+ var peg$e77 = peg$literalExpectation("//", false);
356
+ var peg$e78 = peg$literalExpectation("<=", false);
357
+ var peg$e79 = peg$literalExpectation("<", false);
358
+ var peg$e80 = peg$literalExpectation(">=", false);
359
+ var peg$e81 = peg$otherExpectation("scope reference");
360
+ var peg$e82 = peg$literalExpectation("#!", false);
361
+ var peg$e83 = peg$classExpectation(["\n", "\r"], true, false);
362
+ var peg$e84 = peg$literalExpectation("<<", false);
363
+ var peg$e85 = peg$literalExpectation(">>>", false);
364
+ var peg$e86 = peg$literalExpectation(">>", false);
365
+ var peg$e87 = peg$otherExpectation("lambda function");
366
+ var peg$e88 = peg$literalExpectation("\u2192", false);
367
+ var peg$e89 = peg$literalExpectation("->", false);
368
+ var peg$e90 = peg$otherExpectation("single quote string");
369
+ var peg$e91 = peg$literalExpectation("'", false);
370
+ var peg$e92 = peg$otherExpectation("string");
371
+ var peg$e93 = peg$otherExpectation("template");
372
+ var peg$e94 = peg$literalExpectation("${", false);
373
+ var peg$e95 = peg$otherExpectation("template text");
374
+ var peg$e96 = peg$otherExpectation("template literal");
375
+ var peg$e97 = peg$literalExpectation("`", false);
376
+ var peg$e98 = peg$otherExpectation("template substitution");
377
+ var peg$e99 = peg$classExpectation(["!", "+", "-", "~"], false, false);
380
378
 
381
379
  var peg$f0 = function() {
382
380
  return null;
383
381
  };
384
382
  var peg$f1 = function(head, tail) {
385
- return annotate(tail.reduce(makeBinaryOperation, head), location());
383
+ return tail.reduce(makeBinaryOperation, head);
386
384
  };
387
385
  var peg$f2 = function(entries) {
388
- return annotate(makeArray(entries ?? []), location());
386
+ return makeArray(entries ?? [], location());
389
387
  };
390
388
  var peg$f3 = function(entries) {
391
389
  return annotate(entries, location());
@@ -394,22 +392,24 @@ function peg$parse(input, options) {
394
392
  return annotate([ops.literal, undefined], location());
395
393
  };
396
394
  var peg$f5 = function(parameters, pipeline) {
397
- return annotate([ops.lambda, parameters ?? [], pipeline], location());
395
+ const lambdaParameters = annotate(parameters ?? [], location());
396
+ return annotate([ops.lambda, lambdaParameters, pipeline], location());
398
397
  };
399
398
  var peg$f6 = function(identifier, pipeline) {
400
- return annotate([ops.lambda, [identifier], pipeline], location());
399
+ const lambdaParameters = annotate([identifier], location())
400
+ return annotate([ops.lambda, lambdaParameters, pipeline], location());
401
401
  };
402
402
  var peg$f7 = function(head, tail) {
403
- return annotate(tail.reduce(makeBinaryOperation, head), location());
403
+ return tail.reduce(makeBinaryOperation, head);
404
404
  };
405
405
  var peg$f8 = function(head, tail) {
406
- return annotate(tail.reduce(makeBinaryOperation, head), location());
406
+ return tail.reduce(makeBinaryOperation, head);
407
407
  };
408
408
  var peg$f9 = function(head, tail) {
409
- return annotate(tail.reduce(makeBinaryOperation, head), location());
409
+ return tail.reduce(makeBinaryOperation, head);
410
410
  };
411
411
  var peg$f10 = function(head, tail) {
412
- return annotate(tail.reduce(makeCall, head), location());
412
+ return tail.reduce(makeCall, head);
413
413
  };
414
414
  var peg$f11 = function() {
415
415
  error(`An object ended without a closing brace, or contained something that wasn't expected.\nThe top level of an object can only contain definitions ("a: b" or "a = b") or spreads ("...a").`);
@@ -429,18 +429,19 @@ function peg$parse(input, options) {
429
429
  if (!tail) {
430
430
  return condition;
431
431
  }
432
+ const deferred = makeDeferredArguments(tail);
432
433
  return annotate([
433
434
  ops.conditional,
434
435
  downgradeReference(condition),
435
- [ops.lambda, [], downgradeReference(tail[0])],
436
- [ops.lambda, [], downgradeReference(tail[1])]
436
+ downgradeReference(deferred[0]),
437
+ downgradeReference(deferred[1])
437
438
  ], location());
438
439
  };
439
440
  var peg$f16 = function(chars) {
440
441
  return annotate([ops.literal, chars.join("")], location());
441
442
  };
442
443
  var peg$f17 = function(head, tail) {
443
- return annotate(tail.reduce(makeBinaryOperation, head), location());
444
+ return tail.reduce(makeBinaryOperation, head);
444
445
  };
445
446
  var peg$f18 = function() { return "\0"; };
446
447
  var peg$f19 = function() { return "\b"; };
@@ -504,10 +505,10 @@ function peg$parse(input, options) {
504
505
  };
505
506
  var peg$f39 = function() { return null; };
506
507
  var peg$f40 = function(head, tail) {
507
- return annotate(tail.reduce(makeBinaryOperation, head), location());
508
+ return tail.reduce(makeBinaryOperation, head);
508
509
  };
509
- var peg$f41 = function(at, chars) {
510
- return annotate([ops.builtin, (at ?? "") + chars.join("") + ":"], location());
510
+ var peg$f41 = function(chars) {
511
+ return annotate([ops.builtin, chars.join("") + ":"], location());
511
512
  };
512
513
  var peg$f42 = function(head, tail) {
513
514
  return tail.length === 0
@@ -518,7 +519,7 @@ function peg$parse(input, options) {
518
519
  );
519
520
  };
520
521
  var peg$f43 = function(entries) {
521
- return annotate(makeObject(entries ?? [], ops.object), location());
522
+ return makeObject(entries ?? [], location());
522
523
  };
523
524
  var peg$f44 = function(entries) {
524
525
  return annotate(entries, location());
@@ -534,7 +535,8 @@ function peg$parse(input, options) {
534
535
  return annotate(makeProperty(key, pipeline), location());
535
536
  };
536
537
  var peg$f48 = function(key) {
537
- return annotate([key, [ops.inherited, key]], location());
538
+ const inherited = annotate([ops.inherited, key], location());
539
+ return annotate([key, inherited], location());
538
540
  };
539
541
  var peg$f49 = function(identifier, slash) {
540
542
  return identifier + (slash ?? "");
@@ -567,14 +569,14 @@ function peg$parse(input, options) {
567
569
  };
568
570
  var peg$f56 = function(fn, host, path) {
569
571
  const keys = annotate([host, ...(path ?? [])], location());
570
- return annotate(makeCall(fn, keys), location());
572
+ return makeCall(fn, keys);
571
573
  };
572
574
  var peg$f57 = function(fn, reference) {
573
575
  const literal = annotate([ops.literal, reference[1]], reference.location);
574
- return annotate(makeCall(fn, [literal]), location());
576
+ return makeCall(fn, [literal]);
575
577
  };
576
578
  var peg$f58 = function(head, tail) {
577
- return annotate(tail.reduce(makeBinaryOperation, head), location());
579
+ return tail.reduce(makeBinaryOperation, head);
578
580
  };
579
581
  var peg$f59 = function(key) {
580
582
  return annotate([ops.rootDirectory, key], location());
@@ -586,43 +588,48 @@ function peg$parse(input, options) {
586
588
  const id = identifier + (slashFollows ? "/" : "");
587
589
  return annotate(makeReference(id), location());
588
590
  };
589
- var peg$f62 = function() {
590
- return true;
591
- };
592
- var peg$f63 = function() { return null; };
593
- var peg$f64 = function(head, tail) {
594
- return annotate(tail.reduce(makeBinaryOperation, head), location());
591
+ var peg$f62 = function() { return null; };
592
+ var peg$f63 = function(head, tail) {
593
+ return tail.reduce(makeBinaryOperation, head);
595
594
  };
596
- var peg$f65 = function(definition) {
597
- return annotate([ops.lambda, ["_"], definition], location());
595
+ var peg$f64 = function(definition) {
596
+ const lambdaParameters = annotate(["_"], location());
597
+ return annotate([ops.lambda, lambdaParameters, definition], location());
598
598
  };
599
- var peg$f66 = function() { return null; };
600
- var peg$f67 = function(chars) {
599
+ var peg$f65 = function() { return null; };
600
+ var peg$f66 = function(chars) {
601
601
  return annotate([ops.literal, chars.join("")], location());
602
602
  };
603
- var peg$f68 = function(value) {
603
+ var peg$f67 = function() {
604
+ return annotate([ops.literal, "/"], location());
605
+ };
606
+ var peg$f68 = function() {
607
+ return true;
608
+ };
609
+ var peg$f69 = function(value) {
604
610
  return annotate([ops.spread, value], location());
605
611
  };
606
- var peg$f69 = function(head, tail) {
612
+ var peg$f70 = function(head, tail) {
613
+ const lambdaParameters = annotate(["_"], location());
607
614
  return annotate(
608
- [ops.lambda, ["_"], makeTemplate(ops.templateIndent, head, tail)],
615
+ [ops.lambda, lambdaParameters, makeTemplate(ops.templateIndent, head, tail, location())],
609
616
  location()
610
617
  );
611
618
  };
612
- var peg$f70 = function(chars) {
613
- return chars.join("");
619
+ var peg$f71 = function(chars) {
620
+ return annotate([ops.literal, chars.join("")], location());
614
621
  };
615
- var peg$f71 = function(head, tail) {
616
- return annotate(makeTemplate(ops.template, head, tail), location());
622
+ var peg$f72 = function(head, tail) {
623
+ return makeTemplate(ops.template, head, tail, location());
617
624
  };
618
- var peg$f72 = function(chars) {
619
- return chars.join("");
625
+ var peg$f73 = function(chars) {
626
+ return annotate([ops.literal, chars.join("")], location());
620
627
  };
621
- var peg$f73 = function(expression) {
628
+ var peg$f74 = function(expression) {
622
629
  return annotate(expression, location());
623
630
  };
624
- var peg$f74 = function(operator, expression) {
625
- return annotate(makeUnaryOperation(operator, expression), location());
631
+ var peg$f75 = function(operator, expression) {
632
+ return makeUnaryOperation(operator, expression, location());
626
633
  };
627
634
  var peg$currPos = options.peg$currPos | 0;
628
635
  var peg$savedPos = peg$currPos;
@@ -2950,52 +2957,42 @@ function peg$parse(input, options) {
2950
2957
  }
2951
2958
 
2952
2959
  function peg$parsenamespace() {
2953
- var s0, s1, s2, s3;
2960
+ var s0, s1, s2;
2954
2961
 
2955
2962
  s0 = peg$currPos;
2956
- if (input.charCodeAt(peg$currPos) === 64) {
2957
- s1 = peg$c39;
2963
+ s1 = [];
2964
+ s2 = input.charAt(peg$currPos);
2965
+ if (peg$r5.test(s2)) {
2958
2966
  peg$currPos++;
2959
2967
  } else {
2960
- s1 = peg$FAILED;
2968
+ s2 = peg$FAILED;
2961
2969
  if (peg$silentFails === 0) { peg$fail(peg$e59); }
2962
2970
  }
2963
- if (s1 === peg$FAILED) {
2964
- s1 = null;
2965
- }
2966
- s2 = [];
2967
- s3 = input.charAt(peg$currPos);
2968
- if (peg$r5.test(s3)) {
2969
- peg$currPos++;
2970
- } else {
2971
- s3 = peg$FAILED;
2972
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2973
- }
2974
- if (s3 !== peg$FAILED) {
2975
- while (s3 !== peg$FAILED) {
2976
- s2.push(s3);
2977
- s3 = input.charAt(peg$currPos);
2978
- if (peg$r5.test(s3)) {
2971
+ if (s2 !== peg$FAILED) {
2972
+ while (s2 !== peg$FAILED) {
2973
+ s1.push(s2);
2974
+ s2 = input.charAt(peg$currPos);
2975
+ if (peg$r5.test(s2)) {
2979
2976
  peg$currPos++;
2980
2977
  } else {
2981
- s3 = peg$FAILED;
2982
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2978
+ s2 = peg$FAILED;
2979
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
2983
2980
  }
2984
2981
  }
2985
2982
  } else {
2986
- s2 = peg$FAILED;
2983
+ s1 = peg$FAILED;
2987
2984
  }
2988
- if (s2 !== peg$FAILED) {
2985
+ if (s1 !== peg$FAILED) {
2989
2986
  if (input.charCodeAt(peg$currPos) === 58) {
2990
- s3 = peg$c10;
2987
+ s2 = peg$c10;
2991
2988
  peg$currPos++;
2992
2989
  } else {
2993
- s3 = peg$FAILED;
2990
+ s2 = peg$FAILED;
2994
2991
  if (peg$silentFails === 0) { peg$fail(peg$e16); }
2995
2992
  }
2996
- if (s3 !== peg$FAILED) {
2993
+ if (s2 !== peg$FAILED) {
2997
2994
  peg$savedPos = s0;
2998
- s0 = peg$f41(s1, s2);
2995
+ s0 = peg$f41(s1);
2999
2996
  } else {
3000
2997
  peg$currPos = s0;
3001
2998
  s0 = peg$FAILED;
@@ -3012,27 +3009,27 @@ function peg$parse(input, options) {
3012
3009
  var s0;
3013
3010
 
3014
3011
  if (input.charCodeAt(peg$currPos) === 10) {
3015
- s0 = peg$c40;
3012
+ s0 = peg$c39;
3016
3013
  peg$currPos++;
3017
3014
  } else {
3018
3015
  s0 = peg$FAILED;
3019
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
3016
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
3020
3017
  }
3021
3018
  if (s0 === peg$FAILED) {
3022
- if (input.substr(peg$currPos, 2) === peg$c41) {
3023
- s0 = peg$c41;
3019
+ if (input.substr(peg$currPos, 2) === peg$c40) {
3020
+ s0 = peg$c40;
3024
3021
  peg$currPos += 2;
3025
3022
  } else {
3026
3023
  s0 = peg$FAILED;
3027
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
3024
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
3028
3025
  }
3029
3026
  if (s0 === peg$FAILED) {
3030
3027
  if (input.charCodeAt(peg$currPos) === 13) {
3031
- s0 = peg$c42;
3028
+ s0 = peg$c41;
3032
3029
  peg$currPos++;
3033
3030
  } else {
3034
3031
  s0 = peg$FAILED;
3035
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
3032
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
3036
3033
  }
3037
3034
  }
3038
3035
  }
@@ -3051,7 +3048,7 @@ function peg$parse(input, options) {
3051
3048
  peg$silentFails--;
3052
3049
  if (s0 === peg$FAILED) {
3053
3050
  s1 = peg$FAILED;
3054
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
3051
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
3055
3052
  }
3056
3053
 
3057
3054
  return s0;
@@ -3066,12 +3063,12 @@ function peg$parse(input, options) {
3066
3063
  s2 = [];
3067
3064
  s3 = peg$currPos;
3068
3065
  s4 = peg$parse__();
3069
- if (input.substr(peg$currPos, 2) === peg$c43) {
3070
- s5 = peg$c43;
3066
+ if (input.substr(peg$currPos, 2) === peg$c42) {
3067
+ s5 = peg$c42;
3071
3068
  peg$currPos += 2;
3072
3069
  } else {
3073
3070
  s5 = peg$FAILED;
3074
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
3071
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
3075
3072
  }
3076
3073
  if (s5 !== peg$FAILED) {
3077
3074
  s6 = peg$parse__();
@@ -3090,12 +3087,12 @@ function peg$parse(input, options) {
3090
3087
  s2.push(s3);
3091
3088
  s3 = peg$currPos;
3092
3089
  s4 = peg$parse__();
3093
- if (input.substr(peg$currPos, 2) === peg$c43) {
3094
- s5 = peg$c43;
3090
+ if (input.substr(peg$currPos, 2) === peg$c42) {
3091
+ s5 = peg$c42;
3095
3092
  peg$currPos += 2;
3096
3093
  } else {
3097
3094
  s5 = peg$FAILED;
3098
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
3095
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
3099
3096
  }
3100
3097
  if (s5 !== peg$FAILED) {
3101
3098
  s6 = peg$parse__();
@@ -3127,11 +3124,11 @@ function peg$parse(input, options) {
3127
3124
  peg$silentFails++;
3128
3125
  s0 = peg$currPos;
3129
3126
  if (input.charCodeAt(peg$currPos) === 123) {
3130
- s1 = peg$c44;
3127
+ s1 = peg$c43;
3131
3128
  peg$currPos++;
3132
3129
  } else {
3133
3130
  s1 = peg$FAILED;
3134
- if (peg$silentFails === 0) { peg$fail(peg$e67); }
3131
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
3135
3132
  }
3136
3133
  if (s1 !== peg$FAILED) {
3137
3134
  s2 = peg$parse__();
@@ -3155,7 +3152,7 @@ function peg$parse(input, options) {
3155
3152
  peg$silentFails--;
3156
3153
  if (s0 === peg$FAILED) {
3157
3154
  s1 = peg$FAILED;
3158
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
3155
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
3159
3156
  }
3160
3157
 
3161
3158
  return s0;
@@ -3231,11 +3228,11 @@ function peg$parse(input, options) {
3231
3228
  if (s1 !== peg$FAILED) {
3232
3229
  s2 = peg$parse__();
3233
3230
  if (input.charCodeAt(peg$currPos) === 61) {
3234
- s3 = peg$c45;
3231
+ s3 = peg$c44;
3235
3232
  peg$currPos++;
3236
3233
  } else {
3237
3234
  s3 = peg$FAILED;
3238
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
3235
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
3239
3236
  }
3240
3237
  if (s3 !== peg$FAILED) {
3241
3238
  s4 = peg$parse__();
@@ -3258,7 +3255,7 @@ function peg$parse(input, options) {
3258
3255
  peg$silentFails--;
3259
3256
  if (s0 === peg$FAILED) {
3260
3257
  s1 = peg$FAILED;
3261
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
3258
+ if (peg$silentFails === 0) { peg$fail(peg$e67); }
3262
3259
  }
3263
3260
 
3264
3261
  return s0;
@@ -3321,7 +3318,7 @@ function peg$parse(input, options) {
3321
3318
  peg$silentFails--;
3322
3319
  if (s0 === peg$FAILED) {
3323
3320
  s1 = peg$FAILED;
3324
- if (peg$silentFails === 0) { peg$fail(peg$e70); }
3321
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
3325
3322
  }
3326
3323
 
3327
3324
  return s0;
@@ -3363,7 +3360,7 @@ function peg$parse(input, options) {
3363
3360
  peg$silentFails--;
3364
3361
  if (s0 === peg$FAILED) {
3365
3362
  s1 = peg$FAILED;
3366
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3363
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
3367
3364
  }
3368
3365
 
3369
3366
  return s0;
@@ -3383,7 +3380,7 @@ function peg$parse(input, options) {
3383
3380
  peg$silentFails--;
3384
3381
  if (s0 === peg$FAILED) {
3385
3382
  s1 = peg$FAILED;
3386
- if (peg$silentFails === 0) { peg$fail(peg$e72); }
3383
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3387
3384
  }
3388
3385
 
3389
3386
  return s0;
@@ -3396,11 +3393,11 @@ function peg$parse(input, options) {
3396
3393
  s1 = peg$parseidentifier();
3397
3394
  if (s1 !== peg$FAILED) {
3398
3395
  if (input.charCodeAt(peg$currPos) === 47) {
3399
- s2 = peg$c46;
3396
+ s2 = peg$c45;
3400
3397
  peg$currPos++;
3401
3398
  } else {
3402
3399
  s2 = peg$FAILED;
3403
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3400
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3404
3401
  }
3405
3402
  if (s2 === peg$FAILED) {
3406
3403
  s2 = null;
@@ -3464,7 +3461,7 @@ function peg$parse(input, options) {
3464
3461
  peg$silentFails--;
3465
3462
  if (s0 === peg$FAILED) {
3466
3463
  s1 = peg$FAILED;
3467
- if (peg$silentFails === 0) { peg$fail(peg$e74); }
3464
+ if (peg$silentFails === 0) { peg$fail(peg$e73); }
3468
3465
  }
3469
3466
 
3470
3467
  return s0;
@@ -3496,7 +3493,7 @@ function peg$parse(input, options) {
3496
3493
  peg$silentFails--;
3497
3494
  if (s0 === peg$FAILED) {
3498
3495
  s1 = peg$FAILED;
3499
- if (peg$silentFails === 0) { peg$fail(peg$e75); }
3496
+ if (peg$silentFails === 0) { peg$fail(peg$e74); }
3500
3497
  }
3501
3498
 
3502
3499
  return s0;
@@ -3550,11 +3547,11 @@ function peg$parse(input, options) {
3550
3547
 
3551
3548
  s0 = peg$currPos;
3552
3549
  if (input.charCodeAt(peg$currPos) === 47) {
3553
- s1 = peg$c46;
3550
+ s1 = peg$c45;
3554
3551
  peg$currPos++;
3555
3552
  } else {
3556
3553
  s1 = peg$FAILED;
3557
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3554
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3558
3555
  }
3559
3556
  if (s1 !== peg$FAILED) {
3560
3557
  s2 = peg$parsepathKey();
@@ -3578,7 +3575,7 @@ function peg$parse(input, options) {
3578
3575
  peg$currPos++;
3579
3576
  } else {
3580
3577
  s0 = peg$FAILED;
3581
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
3578
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
3582
3579
  }
3583
3580
  if (s0 === peg$FAILED) {
3584
3581
  s0 = peg$parseescapedChar();
@@ -3652,7 +3649,7 @@ function peg$parse(input, options) {
3652
3649
  if (s0 === peg$FAILED) {
3653
3650
  s0 = peg$parsetemplateLiteral();
3654
3651
  if (s0 === peg$FAILED) {
3655
- s0 = peg$parsereference();
3652
+ s0 = peg$parseinherited();
3656
3653
  }
3657
3654
  }
3658
3655
  }
@@ -3681,7 +3678,7 @@ function peg$parse(input, options) {
3681
3678
  peg$silentFails--;
3682
3679
  if (s0 === peg$FAILED) {
3683
3680
  s1 = peg$FAILED;
3684
- if (peg$silentFails === 0) { peg$fail(peg$e77); }
3681
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
3685
3682
  }
3686
3683
 
3687
3684
  return s0;
@@ -3693,15 +3690,18 @@ function peg$parse(input, options) {
3693
3690
  s0 = peg$currPos;
3694
3691
  s1 = peg$parsenamespace();
3695
3692
  if (s1 !== peg$FAILED) {
3696
- if (input.substr(peg$currPos, 2) === peg$c47) {
3697
- s2 = peg$c47;
3693
+ if (input.substr(peg$currPos, 2) === peg$c46) {
3694
+ s2 = peg$c46;
3698
3695
  peg$currPos += 2;
3699
3696
  } else {
3700
3697
  s2 = peg$FAILED;
3701
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3698
+ if (peg$silentFails === 0) { peg$fail(peg$e77); }
3702
3699
  }
3703
3700
  if (s2 !== peg$FAILED) {
3704
3701
  s3 = peg$parsehost();
3702
+ if (s3 === peg$FAILED) {
3703
+ s3 = peg$parseslash();
3704
+ }
3705
3705
  if (s3 !== peg$FAILED) {
3706
3706
  s4 = peg$parsepath();
3707
3707
  if (s4 === peg$FAILED) {
@@ -3750,7 +3750,7 @@ function peg$parse(input, options) {
3750
3750
  return s0;
3751
3751
  }
3752
3752
 
3753
- function peg$parsereference() {
3753
+ function peg$parseinherited() {
3754
3754
  var s0;
3755
3755
 
3756
3756
  s0 = peg$parserootDirectory();
@@ -3825,28 +3825,28 @@ function peg$parse(input, options) {
3825
3825
  function peg$parserelationalOperator() {
3826
3826
  var s0;
3827
3827
 
3828
- if (input.substr(peg$currPos, 2) === peg$c48) {
3829
- s0 = peg$c48;
3828
+ if (input.substr(peg$currPos, 2) === peg$c47) {
3829
+ s0 = peg$c47;
3830
3830
  peg$currPos += 2;
3831
3831
  } else {
3832
3832
  s0 = peg$FAILED;
3833
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
3833
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3834
3834
  }
3835
3835
  if (s0 === peg$FAILED) {
3836
3836
  if (input.charCodeAt(peg$currPos) === 60) {
3837
- s0 = peg$c49;
3837
+ s0 = peg$c48;
3838
3838
  peg$currPos++;
3839
3839
  } else {
3840
3840
  s0 = peg$FAILED;
3841
- if (peg$silentFails === 0) { peg$fail(peg$e80); }
3841
+ if (peg$silentFails === 0) { peg$fail(peg$e79); }
3842
3842
  }
3843
3843
  if (s0 === peg$FAILED) {
3844
- if (input.substr(peg$currPos, 2) === peg$c50) {
3845
- s0 = peg$c50;
3844
+ if (input.substr(peg$currPos, 2) === peg$c49) {
3845
+ s0 = peg$c49;
3846
3846
  peg$currPos += 2;
3847
3847
  } else {
3848
3848
  s0 = peg$FAILED;
3849
- if (peg$silentFails === 0) { peg$fail(peg$e81); }
3849
+ if (peg$silentFails === 0) { peg$fail(peg$e80); }
3850
3850
  }
3851
3851
  if (s0 === peg$FAILED) {
3852
3852
  if (input.charCodeAt(peg$currPos) === 62) {
@@ -3868,11 +3868,11 @@ function peg$parse(input, options) {
3868
3868
 
3869
3869
  s0 = peg$currPos;
3870
3870
  if (input.charCodeAt(peg$currPos) === 47) {
3871
- s1 = peg$c46;
3871
+ s1 = peg$c45;
3872
3872
  peg$currPos++;
3873
3873
  } else {
3874
3874
  s1 = peg$FAILED;
3875
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3875
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3876
3876
  }
3877
3877
  if (s1 !== peg$FAILED) {
3878
3878
  s2 = peg$parsepathKey();
@@ -3890,21 +3890,21 @@ function peg$parse(input, options) {
3890
3890
  if (s0 === peg$FAILED) {
3891
3891
  s0 = peg$currPos;
3892
3892
  if (input.charCodeAt(peg$currPos) === 47) {
3893
- s1 = peg$c46;
3893
+ s1 = peg$c45;
3894
3894
  peg$currPos++;
3895
3895
  } else {
3896
3896
  s1 = peg$FAILED;
3897
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3897
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3898
3898
  }
3899
3899
  if (s1 !== peg$FAILED) {
3900
3900
  s2 = peg$currPos;
3901
3901
  peg$silentFails++;
3902
3902
  if (input.charCodeAt(peg$currPos) === 47) {
3903
- s3 = peg$c46;
3903
+ s3 = peg$c45;
3904
3904
  peg$currPos++;
3905
3905
  } else {
3906
3906
  s3 = peg$FAILED;
3907
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3907
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3908
3908
  }
3909
3909
  peg$silentFails--;
3910
3910
  if (s3 === peg$FAILED) {
@@ -3949,7 +3949,7 @@ function peg$parse(input, options) {
3949
3949
  peg$silentFails--;
3950
3950
  if (s0 === peg$FAILED) {
3951
3951
  s1 = peg$FAILED;
3952
- if (peg$silentFails === 0) { peg$fail(peg$e82); }
3952
+ if (peg$silentFails === 0) { peg$fail(peg$e81); }
3953
3953
  }
3954
3954
 
3955
3955
  return s0;
@@ -3982,45 +3982,16 @@ function peg$parse(input, options) {
3982
3982
  return s0;
3983
3983
  }
3984
3984
 
3985
- function peg$parseslashFollows() {
3986
- var s0, s1, s2;
3987
-
3988
- s0 = peg$currPos;
3989
- s1 = peg$currPos;
3990
- peg$silentFails++;
3991
- if (input.charCodeAt(peg$currPos) === 47) {
3992
- s2 = peg$c46;
3993
- peg$currPos++;
3994
- } else {
3995
- s2 = peg$FAILED;
3996
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3997
- }
3998
- peg$silentFails--;
3999
- if (s2 !== peg$FAILED) {
4000
- peg$currPos = s1;
4001
- s1 = undefined;
4002
- } else {
4003
- s1 = peg$FAILED;
4004
- }
4005
- if (s1 !== peg$FAILED) {
4006
- peg$savedPos = s0;
4007
- s1 = peg$f62();
4008
- }
4009
- s0 = s1;
4010
-
4011
- return s0;
4012
- }
4013
-
4014
3985
  function peg$parseshebang() {
4015
3986
  var s0, s1, s2, s3;
4016
3987
 
4017
3988
  s0 = peg$currPos;
4018
- if (input.substr(peg$currPos, 2) === peg$c51) {
4019
- s1 = peg$c51;
3989
+ if (input.substr(peg$currPos, 2) === peg$c50) {
3990
+ s1 = peg$c50;
4020
3991
  peg$currPos += 2;
4021
3992
  } else {
4022
3993
  s1 = peg$FAILED;
4023
- if (peg$silentFails === 0) { peg$fail(peg$e83); }
3994
+ if (peg$silentFails === 0) { peg$fail(peg$e82); }
4024
3995
  }
4025
3996
  if (s1 !== peg$FAILED) {
4026
3997
  s2 = [];
@@ -4029,7 +4000,7 @@ function peg$parse(input, options) {
4029
4000
  peg$currPos++;
4030
4001
  } else {
4031
4002
  s3 = peg$FAILED;
4032
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
4003
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
4033
4004
  }
4034
4005
  while (s3 !== peg$FAILED) {
4035
4006
  s2.push(s3);
@@ -4038,11 +4009,11 @@ function peg$parse(input, options) {
4038
4009
  peg$currPos++;
4039
4010
  } else {
4040
4011
  s3 = peg$FAILED;
4041
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
4012
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
4042
4013
  }
4043
4014
  }
4044
4015
  peg$savedPos = s0;
4045
- s0 = peg$f63();
4016
+ s0 = peg$f62();
4046
4017
  } else {
4047
4018
  peg$currPos = s0;
4048
4019
  s0 = peg$FAILED;
@@ -4094,7 +4065,7 @@ function peg$parse(input, options) {
4094
4065
  }
4095
4066
  }
4096
4067
  peg$savedPos = s0;
4097
- s0 = peg$f64(s1, s2);
4068
+ s0 = peg$f63(s1, s2);
4098
4069
  } else {
4099
4070
  peg$currPos = s0;
4100
4071
  s0 = peg$FAILED;
@@ -4106,28 +4077,28 @@ function peg$parse(input, options) {
4106
4077
  function peg$parseshiftOperator() {
4107
4078
  var s0;
4108
4079
 
4109
- if (input.substr(peg$currPos, 2) === peg$c52) {
4110
- s0 = peg$c52;
4080
+ if (input.substr(peg$currPos, 2) === peg$c51) {
4081
+ s0 = peg$c51;
4111
4082
  peg$currPos += 2;
4112
4083
  } else {
4113
4084
  s0 = peg$FAILED;
4114
- if (peg$silentFails === 0) { peg$fail(peg$e85); }
4085
+ if (peg$silentFails === 0) { peg$fail(peg$e84); }
4115
4086
  }
4116
4087
  if (s0 === peg$FAILED) {
4117
- if (input.substr(peg$currPos, 3) === peg$c53) {
4118
- s0 = peg$c53;
4088
+ if (input.substr(peg$currPos, 3) === peg$c52) {
4089
+ s0 = peg$c52;
4119
4090
  peg$currPos += 3;
4120
4091
  } else {
4121
4092
  s0 = peg$FAILED;
4122
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
4093
+ if (peg$silentFails === 0) { peg$fail(peg$e85); }
4123
4094
  }
4124
4095
  if (s0 === peg$FAILED) {
4125
- if (input.substr(peg$currPos, 2) === peg$c54) {
4126
- s0 = peg$c54;
4096
+ if (input.substr(peg$currPos, 2) === peg$c53) {
4097
+ s0 = peg$c53;
4127
4098
  peg$currPos += 2;
4128
4099
  } else {
4129
4100
  s0 = peg$FAILED;
4130
- if (peg$silentFails === 0) { peg$fail(peg$e87); }
4101
+ if (peg$silentFails === 0) { peg$fail(peg$e86); }
4131
4102
  }
4132
4103
  }
4133
4104
  }
@@ -4141,21 +4112,21 @@ function peg$parse(input, options) {
4141
4112
  peg$silentFails++;
4142
4113
  s0 = peg$currPos;
4143
4114
  if (input.charCodeAt(peg$currPos) === 61) {
4144
- s1 = peg$c45;
4115
+ s1 = peg$c44;
4145
4116
  peg$currPos++;
4146
4117
  } else {
4147
4118
  s1 = peg$FAILED;
4148
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
4119
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
4149
4120
  }
4150
4121
  if (s1 !== peg$FAILED) {
4151
4122
  s2 = peg$currPos;
4152
4123
  peg$silentFails++;
4153
4124
  if (input.charCodeAt(peg$currPos) === 61) {
4154
- s3 = peg$c45;
4125
+ s3 = peg$c44;
4155
4126
  peg$currPos++;
4156
4127
  } else {
4157
4128
  s3 = peg$FAILED;
4158
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
4129
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
4159
4130
  }
4160
4131
  peg$silentFails--;
4161
4132
  if (s3 === peg$FAILED) {
@@ -4169,7 +4140,7 @@ function peg$parse(input, options) {
4169
4140
  s4 = peg$parseimplicitParenthesesCallExpression();
4170
4141
  if (s4 !== peg$FAILED) {
4171
4142
  peg$savedPos = s0;
4172
- s0 = peg$f65(s4);
4143
+ s0 = peg$f64(s4);
4173
4144
  } else {
4174
4145
  peg$currPos = s0;
4175
4146
  s0 = peg$FAILED;
@@ -4188,7 +4159,7 @@ function peg$parse(input, options) {
4188
4159
  peg$silentFails--;
4189
4160
  if (s0 === peg$FAILED) {
4190
4161
  s1 = peg$FAILED;
4191
- if (peg$silentFails === 0) { peg$fail(peg$e88); }
4162
+ if (peg$silentFails === 0) { peg$fail(peg$e87); }
4192
4163
  }
4193
4164
 
4194
4165
  return s0;
@@ -4198,19 +4169,19 @@ function peg$parse(input, options) {
4198
4169
  var s0;
4199
4170
 
4200
4171
  if (input.charCodeAt(peg$currPos) === 8594) {
4201
- s0 = peg$c55;
4172
+ s0 = peg$c54;
4202
4173
  peg$currPos++;
4203
4174
  } else {
4204
4175
  s0 = peg$FAILED;
4205
- if (peg$silentFails === 0) { peg$fail(peg$e89); }
4176
+ if (peg$silentFails === 0) { peg$fail(peg$e88); }
4206
4177
  }
4207
4178
  if (s0 === peg$FAILED) {
4208
- if (input.substr(peg$currPos, 2) === peg$c56) {
4209
- s0 = peg$c56;
4179
+ if (input.substr(peg$currPos, 2) === peg$c55) {
4180
+ s0 = peg$c55;
4210
4181
  peg$currPos += 2;
4211
4182
  } else {
4212
4183
  s0 = peg$FAILED;
4213
- if (peg$silentFails === 0) { peg$fail(peg$e90); }
4184
+ if (peg$silentFails === 0) { peg$fail(peg$e89); }
4214
4185
  }
4215
4186
  }
4216
4187
 
@@ -4221,12 +4192,12 @@ function peg$parse(input, options) {
4221
4192
  var s0, s1, s2, s3;
4222
4193
 
4223
4194
  s0 = peg$currPos;
4224
- if (input.substr(peg$currPos, 2) === peg$c47) {
4225
- s1 = peg$c47;
4195
+ if (input.substr(peg$currPos, 2) === peg$c46) {
4196
+ s1 = peg$c46;
4226
4197
  peg$currPos += 2;
4227
4198
  } else {
4228
4199
  s1 = peg$FAILED;
4229
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
4200
+ if (peg$silentFails === 0) { peg$fail(peg$e77); }
4230
4201
  }
4231
4202
  if (s1 !== peg$FAILED) {
4232
4203
  s2 = [];
@@ -4235,7 +4206,7 @@ function peg$parse(input, options) {
4235
4206
  peg$currPos++;
4236
4207
  } else {
4237
4208
  s3 = peg$FAILED;
4238
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
4209
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
4239
4210
  }
4240
4211
  while (s3 !== peg$FAILED) {
4241
4212
  s2.push(s3);
@@ -4244,11 +4215,11 @@ function peg$parse(input, options) {
4244
4215
  peg$currPos++;
4245
4216
  } else {
4246
4217
  s3 = peg$FAILED;
4247
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
4218
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
4248
4219
  }
4249
4220
  }
4250
4221
  peg$savedPos = s0;
4251
- s0 = peg$f66();
4222
+ s0 = peg$f65();
4252
4223
  } else {
4253
4224
  peg$currPos = s0;
4254
4225
  s0 = peg$FAILED;
@@ -4263,11 +4234,11 @@ function peg$parse(input, options) {
4263
4234
  peg$silentFails++;
4264
4235
  s0 = peg$currPos;
4265
4236
  if (input.charCodeAt(peg$currPos) === 39) {
4266
- s1 = peg$c57;
4237
+ s1 = peg$c56;
4267
4238
  peg$currPos++;
4268
4239
  } else {
4269
4240
  s1 = peg$FAILED;
4270
- if (peg$silentFails === 0) { peg$fail(peg$e92); }
4241
+ if (peg$silentFails === 0) { peg$fail(peg$e91); }
4271
4242
  }
4272
4243
  if (s1 !== peg$FAILED) {
4273
4244
  s2 = [];
@@ -4277,15 +4248,15 @@ function peg$parse(input, options) {
4277
4248
  s3 = peg$parsesingleQuoteStringChar();
4278
4249
  }
4279
4250
  if (input.charCodeAt(peg$currPos) === 39) {
4280
- s3 = peg$c57;
4251
+ s3 = peg$c56;
4281
4252
  peg$currPos++;
4282
4253
  } else {
4283
4254
  s3 = peg$FAILED;
4284
- if (peg$silentFails === 0) { peg$fail(peg$e92); }
4255
+ if (peg$silentFails === 0) { peg$fail(peg$e91); }
4285
4256
  }
4286
4257
  if (s3 !== peg$FAILED) {
4287
4258
  peg$savedPos = s0;
4288
- s0 = peg$f67(s2);
4259
+ s0 = peg$f66(s2);
4289
4260
  } else {
4290
4261
  peg$currPos = s0;
4291
4262
  s0 = peg$FAILED;
@@ -4297,7 +4268,7 @@ function peg$parse(input, options) {
4297
4268
  peg$silentFails--;
4298
4269
  if (s0 === peg$FAILED) {
4299
4270
  s1 = peg$FAILED;
4300
- if (peg$silentFails === 0) { peg$fail(peg$e91); }
4271
+ if (peg$silentFails === 0) { peg$fail(peg$e90); }
4301
4272
  }
4302
4273
 
4303
4274
  return s0;
@@ -4310,11 +4281,11 @@ function peg$parse(input, options) {
4310
4281
  s1 = peg$currPos;
4311
4282
  peg$silentFails++;
4312
4283
  if (input.charCodeAt(peg$currPos) === 39) {
4313
- s2 = peg$c57;
4284
+ s2 = peg$c56;
4314
4285
  peg$currPos++;
4315
4286
  } else {
4316
4287
  s2 = peg$FAILED;
4317
- if (peg$silentFails === 0) { peg$fail(peg$e92); }
4288
+ if (peg$silentFails === 0) { peg$fail(peg$e91); }
4318
4289
  }
4319
4290
  if (s2 === peg$FAILED) {
4320
4291
  s2 = peg$parsenewLine();
@@ -4342,6 +4313,49 @@ function peg$parse(input, options) {
4342
4313
  return s0;
4343
4314
  }
4344
4315
 
4316
+ function peg$parseslash() {
4317
+ var s0, s1;
4318
+
4319
+ s0 = peg$currPos;
4320
+ s1 = peg$parseslashFollows();
4321
+ if (s1 !== peg$FAILED) {
4322
+ peg$savedPos = s0;
4323
+ s1 = peg$f67();
4324
+ }
4325
+ s0 = s1;
4326
+
4327
+ return s0;
4328
+ }
4329
+
4330
+ function peg$parseslashFollows() {
4331
+ var s0, s1, s2;
4332
+
4333
+ s0 = peg$currPos;
4334
+ s1 = peg$currPos;
4335
+ peg$silentFails++;
4336
+ if (input.charCodeAt(peg$currPos) === 47) {
4337
+ s2 = peg$c45;
4338
+ peg$currPos++;
4339
+ } else {
4340
+ s2 = peg$FAILED;
4341
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
4342
+ }
4343
+ peg$silentFails--;
4344
+ if (s2 !== peg$FAILED) {
4345
+ peg$currPos = s1;
4346
+ s1 = undefined;
4347
+ } else {
4348
+ s1 = peg$FAILED;
4349
+ }
4350
+ if (s1 !== peg$FAILED) {
4351
+ peg$savedPos = s0;
4352
+ s1 = peg$f68();
4353
+ }
4354
+ s0 = s1;
4355
+
4356
+ return s0;
4357
+ }
4358
+
4345
4359
  function peg$parsespreadElement() {
4346
4360
  var s0, s1, s2, s3;
4347
4361
 
@@ -4352,7 +4366,7 @@ function peg$parse(input, options) {
4352
4366
  s3 = peg$parsepipelineExpression();
4353
4367
  if (s3 !== peg$FAILED) {
4354
4368
  peg$savedPos = s0;
4355
- s0 = peg$f68(s3);
4369
+ s0 = peg$f69(s3);
4356
4370
  } else {
4357
4371
  peg$currPos = s0;
4358
4372
  s0 = peg$FAILED;
@@ -4379,7 +4393,7 @@ function peg$parse(input, options) {
4379
4393
  peg$silentFails--;
4380
4394
  if (s0 === peg$FAILED) {
4381
4395
  s1 = peg$FAILED;
4382
- if (peg$silentFails === 0) { peg$fail(peg$e93); }
4396
+ if (peg$silentFails === 0) { peg$fail(peg$e92); }
4383
4397
  }
4384
4398
 
4385
4399
  return s0;
@@ -4416,10 +4430,10 @@ function peg$parse(input, options) {
4416
4430
  }
4417
4431
  }
4418
4432
  peg$savedPos = s0;
4419
- s0 = peg$f69(s1, s2);
4433
+ s0 = peg$f70(s1, s2);
4420
4434
  peg$silentFails--;
4421
4435
  s1 = peg$FAILED;
4422
- if (peg$silentFails === 0) { peg$fail(peg$e94); }
4436
+ if (peg$silentFails === 0) { peg$fail(peg$e93); }
4423
4437
 
4424
4438
  return s0;
4425
4439
  }
@@ -4430,12 +4444,12 @@ function peg$parse(input, options) {
4430
4444
  s0 = peg$currPos;
4431
4445
  s1 = peg$currPos;
4432
4446
  peg$silentFails++;
4433
- if (input.substr(peg$currPos, 2) === peg$c58) {
4434
- s2 = peg$c58;
4447
+ if (input.substr(peg$currPos, 2) === peg$c57) {
4448
+ s2 = peg$c57;
4435
4449
  peg$currPos += 2;
4436
4450
  } else {
4437
4451
  s2 = peg$FAILED;
4438
- if (peg$silentFails === 0) { peg$fail(peg$e95); }
4452
+ if (peg$silentFails === 0) { peg$fail(peg$e94); }
4439
4453
  }
4440
4454
  peg$silentFails--;
4441
4455
  if (s2 === peg$FAILED) {
@@ -4472,11 +4486,11 @@ function peg$parse(input, options) {
4472
4486
  s2 = peg$parsetemplateDocumentChar();
4473
4487
  }
4474
4488
  peg$savedPos = s0;
4475
- s1 = peg$f70(s1);
4489
+ s1 = peg$f71(s1);
4476
4490
  s0 = s1;
4477
4491
  peg$silentFails--;
4478
4492
  s1 = peg$FAILED;
4479
- if (peg$silentFails === 0) { peg$fail(peg$e96); }
4493
+ if (peg$silentFails === 0) { peg$fail(peg$e95); }
4480
4494
 
4481
4495
  return s0;
4482
4496
  }
@@ -4487,11 +4501,11 @@ function peg$parse(input, options) {
4487
4501
  peg$silentFails++;
4488
4502
  s0 = peg$currPos;
4489
4503
  if (input.charCodeAt(peg$currPos) === 96) {
4490
- s1 = peg$c59;
4504
+ s1 = peg$c58;
4491
4505
  peg$currPos++;
4492
4506
  } else {
4493
4507
  s1 = peg$FAILED;
4494
- if (peg$silentFails === 0) { peg$fail(peg$e98); }
4508
+ if (peg$silentFails === 0) { peg$fail(peg$e97); }
4495
4509
  }
4496
4510
  if (s1 !== peg$FAILED) {
4497
4511
  s2 = peg$parsetemplateLiteralText();
@@ -4520,15 +4534,15 @@ function peg$parse(input, options) {
4520
4534
  }
4521
4535
  }
4522
4536
  if (input.charCodeAt(peg$currPos) === 96) {
4523
- s4 = peg$c59;
4537
+ s4 = peg$c58;
4524
4538
  peg$currPos++;
4525
4539
  } else {
4526
4540
  s4 = peg$FAILED;
4527
- if (peg$silentFails === 0) { peg$fail(peg$e98); }
4541
+ if (peg$silentFails === 0) { peg$fail(peg$e97); }
4528
4542
  }
4529
4543
  if (s4 !== peg$FAILED) {
4530
4544
  peg$savedPos = s0;
4531
- s0 = peg$f71(s2, s3);
4545
+ s0 = peg$f72(s2, s3);
4532
4546
  } else {
4533
4547
  peg$currPos = s0;
4534
4548
  s0 = peg$FAILED;
@@ -4540,7 +4554,7 @@ function peg$parse(input, options) {
4540
4554
  peg$silentFails--;
4541
4555
  if (s0 === peg$FAILED) {
4542
4556
  s1 = peg$FAILED;
4543
- if (peg$silentFails === 0) { peg$fail(peg$e97); }
4557
+ if (peg$silentFails === 0) { peg$fail(peg$e96); }
4544
4558
  }
4545
4559
 
4546
4560
  return s0;
@@ -4553,19 +4567,19 @@ function peg$parse(input, options) {
4553
4567
  s1 = peg$currPos;
4554
4568
  peg$silentFails++;
4555
4569
  if (input.charCodeAt(peg$currPos) === 96) {
4556
- s2 = peg$c59;
4570
+ s2 = peg$c58;
4557
4571
  peg$currPos++;
4558
4572
  } else {
4559
4573
  s2 = peg$FAILED;
4560
- if (peg$silentFails === 0) { peg$fail(peg$e98); }
4574
+ if (peg$silentFails === 0) { peg$fail(peg$e97); }
4561
4575
  }
4562
4576
  if (s2 === peg$FAILED) {
4563
- if (input.substr(peg$currPos, 2) === peg$c58) {
4564
- s2 = peg$c58;
4577
+ if (input.substr(peg$currPos, 2) === peg$c57) {
4578
+ s2 = peg$c57;
4565
4579
  peg$currPos += 2;
4566
4580
  } else {
4567
4581
  s2 = peg$FAILED;
4568
- if (peg$silentFails === 0) { peg$fail(peg$e95); }
4582
+ if (peg$silentFails === 0) { peg$fail(peg$e94); }
4569
4583
  }
4570
4584
  }
4571
4585
  peg$silentFails--;
@@ -4602,7 +4616,7 @@ function peg$parse(input, options) {
4602
4616
  s2 = peg$parsetemplateLiteralChar();
4603
4617
  }
4604
4618
  peg$savedPos = s0;
4605
- s1 = peg$f72(s1);
4619
+ s1 = peg$f73(s1);
4606
4620
  s0 = s1;
4607
4621
 
4608
4622
  return s0;
@@ -4613,12 +4627,12 @@ function peg$parse(input, options) {
4613
4627
 
4614
4628
  peg$silentFails++;
4615
4629
  s0 = peg$currPos;
4616
- if (input.substr(peg$currPos, 2) === peg$c58) {
4617
- s1 = peg$c58;
4630
+ if (input.substr(peg$currPos, 2) === peg$c57) {
4631
+ s1 = peg$c57;
4618
4632
  peg$currPos += 2;
4619
4633
  } else {
4620
4634
  s1 = peg$FAILED;
4621
- if (peg$silentFails === 0) { peg$fail(peg$e95); }
4635
+ if (peg$silentFails === 0) { peg$fail(peg$e94); }
4622
4636
  }
4623
4637
  if (s1 !== peg$FAILED) {
4624
4638
  s2 = peg$parseexpression();
@@ -4632,7 +4646,7 @@ function peg$parse(input, options) {
4632
4646
  }
4633
4647
  if (s3 !== peg$FAILED) {
4634
4648
  peg$savedPos = s0;
4635
- s0 = peg$f73(s2);
4649
+ s0 = peg$f74(s2);
4636
4650
  } else {
4637
4651
  peg$currPos = s0;
4638
4652
  s0 = peg$FAILED;
@@ -4648,7 +4662,7 @@ function peg$parse(input, options) {
4648
4662
  peg$silentFails--;
4649
4663
  if (s0 === peg$FAILED) {
4650
4664
  s1 = peg$FAILED;
4651
- if (peg$silentFails === 0) { peg$fail(peg$e99); }
4665
+ if (peg$silentFails === 0) { peg$fail(peg$e98); }
4652
4666
  }
4653
4667
 
4654
4668
  return s0;
@@ -4681,7 +4695,7 @@ function peg$parse(input, options) {
4681
4695
  s3 = peg$parseunaryExpression();
4682
4696
  if (s3 !== peg$FAILED) {
4683
4697
  peg$savedPos = s0;
4684
- s0 = peg$f74(s1, s3);
4698
+ s0 = peg$f75(s1, s3);
4685
4699
  } else {
4686
4700
  peg$currPos = s0;
4687
4701
  s0 = peg$FAILED;
@@ -4705,7 +4719,7 @@ function peg$parse(input, options) {
4705
4719
  peg$currPos++;
4706
4720
  } else {
4707
4721
  s0 = peg$FAILED;
4708
- if (peg$silentFails === 0) { peg$fail(peg$e100); }
4722
+ if (peg$silentFails === 0) { peg$fail(peg$e99); }
4709
4723
  }
4710
4724
 
4711
4725
  return s0;
@@ -4856,13 +4870,12 @@ const peg$allowedStartRules = [
4856
4870
  "program",
4857
4871
  "protocolExpression",
4858
4872
  "qualifiedReference",
4859
- "reference",
4873
+ "inherited",
4860
4874
  "relationalExpression",
4861
4875
  "relationalOperator",
4862
4876
  "rootDirectory",
4863
4877
  "scopeReference",
4864
4878
  "separator",
4865
- "slashFollows",
4866
4879
  "shebang",
4867
4880
  "shiftExpression",
4868
4881
  "shiftOperator",
@@ -4871,6 +4884,8 @@ const peg$allowedStartRules = [
4871
4884
  "singleLineComment",
4872
4885
  "singleQuoteString",
4873
4886
  "singleQuoteStringChar",
4887
+ "slash",
4888
+ "slashFollows",
4874
4889
  "spreadElement",
4875
4890
  "stringLiteral",
4876
4891
  "templateDocument",