@weborigami/language 0.1.0 → 0.2.0

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.
@@ -7,19 +7,29 @@
7
7
  //
8
8
  // Origami language parser
9
9
  //
10
+ // This generally follows the pattern of the JavaScript expression grammar at
11
+ // https://github.com/pegjs/pegjs/blob/master/examples/javascript.pegjs. Like
12
+ // that parser, this one uses the ECMAScript grammar terms where relevant.
13
+ //
10
14
  // Generate the parser via `npm build`.
15
+ //
11
16
  // @ts-nocheck
12
17
  //
13
18
 
14
19
  import * as ops from "../runtime/ops.js";
15
20
  import {
16
21
  annotate,
22
+ downgradeReference,
17
23
  makeArray,
18
- makeFunctionCall,
24
+ makeBinaryOperatorChain,
25
+ makeCall,
26
+ makeDeferredArguments,
19
27
  makeObject,
20
28
  makePipeline,
21
29
  makeProperty,
22
- makeTemplate
30
+ makeReference,
31
+ makeTemplate,
32
+ makeUnaryOperatorCall
23
33
  } from "./parserHelpers.js";
24
34
 
25
35
 
@@ -192,110 +202,119 @@ function peg$parse(input, options) {
192
202
  var peg$FAILED = {};
193
203
  var peg$source = options.grammarSource;
194
204
 
195
- var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, args: peg$parseargs, array: peg$parsearray, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, callTarget: peg$parsecallTarget, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParen: peg$parseclosingParen, comment: peg$parsecomment, digits: peg$parsedigits, doubleArrow: peg$parsedoubleArrow, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, doubleSlashPath: peg$parsedoubleSlashPath, ellipsis: peg$parseellipsis, escapedChar: peg$parseescapedChar, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, functionReference: peg$parsefunctionReference, group: peg$parsegroup, guillemetString: peg$parseguillemetString, guillemetStringChar: peg$parseguillemetStringChar, homeTree: peg$parsehomeTree, host: peg$parsehost, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParensArgs: peg$parseimplicitParensArgs, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, multiLineComment: peg$parsemultiLineComment, namespace: peg$parsenamespace, namespacePath: peg$parsenamespacePath, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectEntries: peg$parseobjectEntries, objectEntry: peg$parseobjectEntry, objectGetter: peg$parseobjectGetter, objectHiddenKey: peg$parseobjectHiddenKey, objectKey: peg$parseobjectKey, objectProperty: peg$parseobjectProperty, objectShorthandProperty: peg$parseobjectShorthandProperty, objectPublicKey: peg$parseobjectPublicKey, parameterizedLambda: peg$parseparameterizedLambda, parensArgs: peg$parseparensArgs, path: peg$parsepath, pathElement: peg$parsepathElement, pathKeyChar: peg$parsepathKeyChar, pathTail: peg$parsepathTail, pipeline: peg$parsepipeline, pipelineStep: peg$parsepipelineStep, program: peg$parseprogram, scopeReference: peg$parsescopeReference, scopeTraverse: peg$parsescopeTraverse, separator: peg$parseseparator, shebang: peg$parseshebang, sign: peg$parsesign, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, spread: peg$parsespread, start: peg$parsestart, string: peg$parsestring, taggedTemplate: peg$parsetaggedTemplate, 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, value: peg$parsevalue, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
205
+ var peg$startRuleFunctions = { __: peg$parse__, arguments: peg$parsearguments, arrayLiteral: peg$parsearrayLiteral, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, arrowFunction: peg$parsearrowFunction, callExpression: peg$parsecallExpression, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParenthesis: peg$parseclosingParenthesis, 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, 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, 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, rootDirectory: peg$parserootDirectory, scopeReference: peg$parsescopeReference, separator: peg$parseseparator, slashFollows: peg$parseslashFollows, shebang: peg$parseshebang, shorthandFunction: peg$parseshorthandFunction, sign: peg$parsesign, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, spread: peg$parsespread, stringLiteral: peg$parsestringLiteral, 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, unaryExpression: peg$parseunaryExpression, unaryOperator: peg$parseunaryOperator, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
196
206
  var peg$startRuleFunction = peg$parse__;
197
207
 
198
- var peg$c0 = "//";
199
- var peg$c1 = "[";
200
- var peg$c2 = "}";
201
- var peg$c3 = "]";
202
- var peg$c4 = ")";
203
- var peg$c5 = "\u21D2";
204
- var peg$c6 = "=>";
205
- var peg$c7 = "\"";
206
- var peg$c8 = "...";
207
- var peg$c9 = "\u2026";
208
- var peg$c10 = "\\0";
209
- var peg$c11 = "\\b";
210
- var peg$c12 = "\\f";
211
- var peg$c13 = "\\n";
212
- var peg$c14 = "\\r";
213
- var peg$c15 = "\\t";
214
- var peg$c16 = "\\v";
215
- var peg$c17 = "\\";
216
- var peg$c18 = ".";
217
- var peg$c19 = "(";
218
- var peg$c20 = "\xAB";
219
- var peg$c21 = "\xBB";
220
- var peg$c22 = "~";
221
- var peg$c23 = ":";
222
- var peg$c24 = "/";
223
- var peg$c25 = "-";
224
- var peg$c26 = ">";
225
- var peg$c27 = "=";
226
- var peg$c28 = "/*";
227
- var peg$c29 = "*/";
228
- var peg$c30 = "@";
229
- var peg$c31 = "\n";
230
- var peg$c32 = "\r\n";
231
- var peg$c33 = "\r";
232
- var peg$c34 = "{";
233
- var peg$c35 = ",";
234
- var peg$c36 = "#!";
235
- var peg$c37 = "\u2192";
236
- var peg$c38 = "->";
237
- var peg$c39 = "'";
238
- var peg$c40 = "`";
239
- var peg$c41 = "${";
208
+ var peg$c0 = "[";
209
+ var peg$c1 = "(";
210
+ var peg$c2 = ")";
211
+ var peg$c3 = "}";
212
+ var peg$c4 = "]";
213
+ var peg$c5 = "?";
214
+ var peg$c6 = ":";
215
+ var peg$c7 = "\u21D2";
216
+ var peg$c8 = "=>";
217
+ var peg$c9 = "\"";
218
+ var peg$c10 = "...";
219
+ var peg$c11 = "\u2026";
220
+ var peg$c12 = "===";
221
+ var peg$c13 = "!==";
222
+ var peg$c14 = "==";
223
+ var peg$c15 = "!=";
224
+ var peg$c16 = "\\0";
225
+ var peg$c17 = "\\b";
226
+ var peg$c18 = "\\f";
227
+ var peg$c19 = "\\n";
228
+ var peg$c20 = "\\r";
229
+ var peg$c21 = "\\t";
230
+ var peg$c22 = "\\v";
231
+ var peg$c23 = "\\";
232
+ var peg$c24 = ".";
233
+ var peg$c25 = "\xAB";
234
+ var peg$c26 = "\xBB";
235
+ var peg$c27 = "~";
236
+ var peg$c28 = "-";
237
+ var peg$c29 = ">";
238
+ var peg$c30 = "&&";
239
+ var peg$c31 = "||";
240
+ var peg$c32 = "/*";
241
+ var peg$c33 = "*/";
242
+ var peg$c34 = "@";
243
+ var peg$c35 = "\n";
244
+ var peg$c36 = "\r\n";
245
+ var peg$c37 = "\r";
246
+ var peg$c38 = "??";
247
+ var peg$c39 = "{";
248
+ var peg$c40 = "=";
249
+ var peg$c41 = "/";
250
+ var peg$c42 = "//";
251
+ var peg$c43 = ",";
252
+ var peg$c44 = "#!";
253
+ var peg$c45 = "\u2192";
254
+ var peg$c46 = "->";
255
+ var peg$c47 = "'";
256
+ var peg$c48 = "${";
257
+ var peg$c49 = "`";
258
+ var peg$c50 = "!";
240
259
 
241
260
  var peg$r0 = /^[0-9]/;
242
- var peg$r1 = /^[^(){}[\]<>\-=,\/:`"'\xAB\xBB\\ \u2192\u21D2\t\n\r]/;
261
+ var peg$r1 = /^[^(){}[\]<>?!&|\-=,\/:`"'\xAB\xBB\\ \u2192\u21D2\t\n\r]/;
243
262
  var peg$r2 = /^[ \t]/;
244
263
  var peg$r3 = /^[A-Za-z]/;
245
264
  var peg$r4 = /^[^(){}[\],:\/\\ \t\n\r]/;
246
265
  var peg$r5 = /^[^\n\r]/;
247
266
  var peg$r6 = /^[+\-]/;
248
267
 
249
- var peg$e0 = peg$otherExpectation("absolute file path");
250
- var peg$e1 = peg$literalExpectation("//", false);
251
- var peg$e2 = peg$otherExpectation("function arguments");
252
- var peg$e3 = peg$otherExpectation("array");
253
- var peg$e4 = peg$literalExpectation("[", false);
268
+ var peg$e0 = peg$otherExpectation("function arguments");
269
+ var peg$e1 = peg$otherExpectation("array");
270
+ var peg$e2 = peg$literalExpectation("[", false);
271
+ var peg$e3 = peg$literalExpectation("(", false);
272
+ var peg$e4 = peg$literalExpectation(")", false);
254
273
  var peg$e5 = peg$otherExpectation("function call");
255
274
  var peg$e6 = peg$literalExpectation("}", false);
256
275
  var peg$e7 = peg$anyExpectation();
257
276
  var peg$e8 = peg$literalExpectation("]", false);
258
- var peg$e9 = peg$literalExpectation(")", false);
259
- var peg$e10 = peg$otherExpectation("comment");
260
- var peg$e11 = peg$classExpectation([["0", "9"]], false, false);
261
- var peg$e12 = peg$literalExpectation("\u21D2", false);
262
- var peg$e13 = peg$literalExpectation("=>", false);
263
- var peg$e14 = peg$otherExpectation("double quote string");
264
- var peg$e15 = peg$literalExpectation("\"", false);
265
- var peg$e16 = peg$literalExpectation("...", false);
266
- var peg$e17 = peg$literalExpectation("\u2026", false);
267
- var peg$e18 = peg$otherExpectation("backslash-escaped character");
268
- var peg$e19 = peg$literalExpectation("\\0", false);
269
- var peg$e20 = peg$literalExpectation("\\b", false);
270
- var peg$e21 = peg$literalExpectation("\\f", false);
271
- var peg$e22 = peg$literalExpectation("\\n", false);
272
- var peg$e23 = peg$literalExpectation("\\r", false);
273
- var peg$e24 = peg$literalExpectation("\\t", false);
274
- var peg$e25 = peg$literalExpectation("\\v", false);
275
- var peg$e26 = peg$literalExpectation("\\", false);
276
- var peg$e27 = peg$otherExpectation("floating-point number");
277
- var peg$e28 = peg$literalExpectation(".", false);
278
- var peg$e29 = peg$otherExpectation("function composition");
279
- var peg$e30 = peg$otherExpectation("parenthetical group");
280
- var peg$e31 = peg$literalExpectation("(", false);
281
- var peg$e32 = peg$otherExpectation("guillemet string");
282
- var peg$e33 = peg$literalExpectation("\xAB", false);
283
- var peg$e34 = peg$literalExpectation("\xBB", false);
284
- var peg$e35 = peg$literalExpectation("~", false);
285
- var peg$e36 = peg$otherExpectation("HTTP/HTTPS host");
286
- var peg$e37 = peg$literalExpectation(":", false);
287
- var peg$e38 = peg$literalExpectation("/", false);
288
- var peg$e39 = peg$otherExpectation("identifier");
289
- var peg$e40 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "-", "=", ",", "/", ":", "`", "\"", "'", "\xAB", "\xBB", "\\", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
290
- var peg$e41 = peg$literalExpectation("-", false);
291
- var peg$e42 = peg$literalExpectation(">", false);
292
- var peg$e43 = peg$otherExpectation("arguments with implicit parentheses");
293
- var peg$e44 = peg$classExpectation([" ", "\t"], false, false);
294
- var peg$e45 = peg$otherExpectation("integer");
295
- var peg$e46 = peg$otherExpectation("lambda function");
296
- var peg$e47 = peg$literalExpectation("=", false);
297
- var peg$e48 = peg$otherExpectation("path with a leading slash");
298
- var peg$e49 = peg$otherExpectation("list");
277
+ var peg$e9 = peg$otherExpectation("comment");
278
+ var peg$e10 = peg$literalExpectation("?", false);
279
+ var peg$e11 = peg$literalExpectation(":", false);
280
+ var peg$e12 = peg$classExpectation([["0", "9"]], false, false);
281
+ var peg$e13 = peg$literalExpectation("\u21D2", false);
282
+ var peg$e14 = peg$literalExpectation("=>", false);
283
+ var peg$e15 = peg$otherExpectation("double quote string");
284
+ var peg$e16 = peg$literalExpectation("\"", false);
285
+ var peg$e17 = peg$literalExpectation("...", false);
286
+ var peg$e18 = peg$literalExpectation("\u2026", false);
287
+ var peg$e19 = peg$literalExpectation("===", false);
288
+ var peg$e20 = peg$literalExpectation("!==", false);
289
+ var peg$e21 = peg$literalExpectation("==", false);
290
+ var peg$e22 = peg$literalExpectation("!=", false);
291
+ var peg$e23 = peg$otherExpectation("backslash-escaped character");
292
+ var peg$e24 = peg$literalExpectation("\\0", false);
293
+ var peg$e25 = peg$literalExpectation("\\b", false);
294
+ var peg$e26 = peg$literalExpectation("\\f", false);
295
+ var peg$e27 = peg$literalExpectation("\\n", false);
296
+ var peg$e28 = peg$literalExpectation("\\r", false);
297
+ var peg$e29 = peg$literalExpectation("\\t", false);
298
+ var peg$e30 = peg$literalExpectation("\\v", false);
299
+ var peg$e31 = peg$literalExpectation("\\", false);
300
+ var peg$e32 = peg$otherExpectation("floating-point number");
301
+ var peg$e33 = peg$literalExpectation(".", false);
302
+ var peg$e34 = peg$otherExpectation("parenthetical group");
303
+ var peg$e35 = peg$otherExpectation("guillemet string");
304
+ var peg$e36 = peg$literalExpectation("\xAB", false);
305
+ var peg$e37 = peg$literalExpectation("\xBB", false);
306
+ var peg$e38 = peg$literalExpectation("~", false);
307
+ var peg$e39 = peg$otherExpectation("HTTP/HTTPS host");
308
+ var peg$e40 = peg$otherExpectation("identifier");
309
+ var peg$e41 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "?", "!", "&", "|", "-", "=", ",", "/", ":", "`", "\"", "'", "\xAB", "\xBB", "\\", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
310
+ var peg$e42 = peg$literalExpectation("-", false);
311
+ var peg$e43 = peg$literalExpectation(">", false);
312
+ var peg$e44 = peg$otherExpectation("function call with implicit parentheses");
313
+ var peg$e45 = peg$classExpectation([" ", "\t"], false, false);
314
+ var peg$e46 = peg$otherExpectation("integer");
315
+ var peg$e47 = peg$otherExpectation("list");
316
+ var peg$e48 = peg$literalExpectation("&&", false);
317
+ var peg$e49 = peg$literalExpectation("||", false);
299
318
  var peg$e50 = peg$literalExpectation("/*", false);
300
319
  var peg$e51 = peg$literalExpectation("*/", false);
301
320
  var peg$e52 = peg$literalExpectation("@", false);
@@ -304,48 +323,56 @@ function peg$parse(input, options) {
304
323
  var peg$e55 = peg$literalExpectation("\r\n", false);
305
324
  var peg$e56 = peg$literalExpectation("\r", false);
306
325
  var peg$e57 = peg$otherExpectation("number");
307
- var peg$e58 = peg$otherExpectation("object literal");
308
- var peg$e59 = peg$literalExpectation("{", false);
309
- var peg$e60 = peg$otherExpectation("object getter");
310
- var peg$e61 = peg$otherExpectation("object key");
311
- var peg$e62 = peg$otherExpectation("object property");
312
- var peg$e63 = peg$otherExpectation("object identifier");
313
- var peg$e64 = peg$otherExpectation("function arguments in parentheses");
314
- var peg$e65 = peg$otherExpectation("slash-separated path");
315
- var peg$e66 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
316
- var peg$e67 = peg$otherExpectation("Origami program");
317
- var peg$e68 = peg$otherExpectation("scope reference");
318
- var peg$e69 = peg$literalExpectation(",", false);
319
- var peg$e70 = peg$literalExpectation("#!", false);
320
- var peg$e71 = peg$classExpectation(["\n", "\r"], true, false);
321
- var peg$e72 = peg$classExpectation(["+", "-"], false, false);
322
- var peg$e73 = peg$literalExpectation("\u2192", false);
323
- var peg$e74 = peg$literalExpectation("->", false);
324
- var peg$e75 = peg$otherExpectation("single quote string");
325
- var peg$e76 = peg$literalExpectation("'", false);
326
- var peg$e77 = peg$otherExpectation("string");
327
- var peg$e78 = peg$literalExpectation("`", false);
328
- var peg$e79 = peg$otherExpectation("template");
329
- var peg$e80 = peg$literalExpectation("${", false);
330
- var peg$e81 = peg$otherExpectation("template text");
331
- var peg$e82 = peg$otherExpectation("template literal");
332
- var peg$e83 = peg$otherExpectation("template substitution");
326
+ var peg$e58 = peg$literalExpectation("??", false);
327
+ var peg$e59 = peg$otherExpectation("object literal");
328
+ var peg$e60 = peg$literalExpectation("{", false);
329
+ var peg$e61 = peg$otherExpectation("object getter");
330
+ var peg$e62 = peg$literalExpectation("=", false);
331
+ var peg$e63 = peg$otherExpectation("object key");
332
+ var peg$e64 = peg$otherExpectation("object property");
333
+ var peg$e65 = peg$otherExpectation("object identifier");
334
+ var peg$e66 = peg$literalExpectation("/", false);
335
+ var peg$e67 = peg$otherExpectation("function arguments in parentheses");
336
+ var peg$e68 = peg$otherExpectation("slash-separated path");
337
+ var peg$e69 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
338
+ var peg$e70 = peg$otherExpectation("Origami program");
339
+ var peg$e71 = peg$literalExpectation("//", false);
340
+ var peg$e72 = peg$otherExpectation("scope reference");
341
+ var peg$e73 = peg$literalExpectation(",", false);
342
+ var peg$e74 = peg$literalExpectation("#!", false);
343
+ var peg$e75 = peg$classExpectation(["\n", "\r"], true, false);
344
+ var peg$e76 = peg$otherExpectation("lambda function");
345
+ var peg$e77 = peg$classExpectation(["+", "-"], false, false);
346
+ var peg$e78 = peg$literalExpectation("\u2192", false);
347
+ var peg$e79 = peg$literalExpectation("->", false);
348
+ var peg$e80 = peg$otherExpectation("single quote string");
349
+ var peg$e81 = peg$literalExpectation("'", false);
350
+ var peg$e82 = peg$otherExpectation("string");
351
+ var peg$e83 = peg$otherExpectation("template");
352
+ var peg$e84 = peg$literalExpectation("${", false);
353
+ var peg$e85 = peg$otherExpectation("template text");
354
+ var peg$e86 = peg$otherExpectation("template literal");
355
+ var peg$e87 = peg$literalExpectation("`", false);
356
+ var peg$e88 = peg$otherExpectation("template substitution");
357
+ var peg$e89 = peg$literalExpectation("!", false);
333
358
 
334
359
  var peg$f0 = function() {
335
360
  return null;
336
361
  };
337
- var peg$f1 = function(path) {
338
- return annotate([[ops.filesRoot], ...path], location());
339
- };
340
- var peg$f2 = function(path) {
341
- return annotate([ops.traverse, ...path], location());
342
- };
343
- var peg$f3 = function(entries) {
362
+ var peg$f1 = function(entries) {
344
363
  return annotate(makeArray(entries ?? []), location());
345
364
  };
346
- var peg$f4 = function(entries) {
365
+ var peg$f2 = function(entries) {
347
366
  return annotate(entries, location());
348
367
  };
368
+ var peg$f3 = function(parameters, pipeline) {
369
+ return annotate([ops.lambda, parameters ?? [], pipeline], location());
370
+ };
371
+ var peg$f4 = function(head, tail) {
372
+ return tail.length === 0
373
+ ? head
374
+ : annotate(tail.reduce(makeCall, head), location());
375
+ };
349
376
  var peg$f5 = function() {
350
377
  error("Expected right curly brace");
351
378
  };
@@ -355,173 +382,189 @@ function peg$parse(input, options) {
355
382
  var peg$f7 = function() {
356
383
  error("Expected right parenthesis");
357
384
  };
358
- var peg$f8 = function(chars) {
385
+ var peg$f8 = function(condition, truthy, falsy) {
386
+ return annotate([
387
+ ops.conditional,
388
+ downgradeReference(condition),
389
+ [ops.lambda, [], downgradeReference(truthy)],
390
+ [ops.lambda, [], downgradeReference(falsy)]
391
+ ], location());
392
+ };
393
+ var peg$f9 = function(chars) {
359
394
  return annotate([ops.literal, chars.join("")], location());
360
395
  };
361
- var peg$f9 = function(host, path) {
362
- return annotate([host, ...(path ?? [])], location());
396
+ var peg$f10 = function(head, tail) {
397
+ return tail.length === 0
398
+ ? head
399
+ : annotate(makeBinaryOperatorChain(head, tail), location());
363
400
  };
364
- var peg$f10 = function() { return "\0"; };
365
- var peg$f11 = function() { return "\b"; };
366
- var peg$f12 = function() { return "\f"; };
367
- var peg$f13 = function() { return "\n"; };
368
- var peg$f14 = function() { return "\r"; };
369
- var peg$f15 = function() { return "\t"; };
370
- var peg$f16 = function() { return "\v"; };
371
- var peg$f17 = function() {
401
+ var peg$f11 = function() { return "\0"; };
402
+ var peg$f12 = function() { return "\b"; };
403
+ var peg$f13 = function() { return "\f"; };
404
+ var peg$f14 = function() { return "\n"; };
405
+ var peg$f15 = function() { return "\r"; };
406
+ var peg$f16 = function() { return "\t"; };
407
+ var peg$f17 = function() { return "\v"; };
408
+ var peg$f18 = function() {
372
409
  return annotate([ops.literal, parseFloat(text())], location());
373
410
  };
374
- var peg$f18 = function(target, chain, end) {
375
- if (end) {
376
- chain.push(end);
377
- }
378
- return annotate(makeFunctionCall(target, chain, location()), location());
379
- };
380
- var peg$f19 = function(target, chain, end) {
381
- if (end) {
382
- chain.push(end);
383
- }
384
- return annotate(makeFunctionCall(target, chain, location()), location());
385
- };
386
- var peg$f20 = function(ref) {
387
- // If the reference looks like a builtin name, we treat it as a builtin
388
- // reference, otherwise it's a regular scope reference. We can't make this
389
- // distinction in the grammar.
390
- const name = ref[1];
391
- const builtinRegex = /^[A-Za-z][A-Za-z0-9]*$/;
392
- const op = builtinRegex.test(name) ? ops.builtin : ops.scope;
393
- return annotate([op, name], location());
411
+ var peg$f19 = function(expression) {
412
+ return annotate(downgradeReference(expression), location());
394
413
  };
395
- var peg$f21 = function(pipeline) {
396
- return annotate(pipeline, location());
397
- };
398
- var peg$f22 = function(chars) {
414
+ var peg$f20 = function(chars) {
399
415
  return annotate([ops.literal, chars.join("")], location());
400
416
  };
401
- var peg$f23 = function() {
402
- return annotate([ops.homeTree], location());
417
+ var peg$f21 = function() {
418
+ return annotate([ops.homeDirectory], location());
403
419
  };
404
- var peg$f24 = function(identifier, port, slash) {
420
+ var peg$f22 = function(identifier, port, slashFollows) {
405
421
  const portText = port ? `:${port[1]}` : "";
406
- const slashText = slash ? "/" : "";
422
+ const slashText = slashFollows ? "/" : "";
407
423
  const hostText = identifier + portText + slashText;
408
424
  return annotate([ops.literal, hostText], location());
409
425
  };
410
- var peg$f25 = function(chars) { return chars.join(""); };
411
- var peg$f26 = function(list) {
426
+ var peg$f23 = function(chars) { return chars.join(""); };
427
+ var peg$f24 = function(list) {
412
428
  return annotate(list, location());
413
429
  };
430
+ var peg$f25 = function(head, args) {
431
+ return args ? makeCall(head, args) : head;
432
+ };
433
+ var peg$f26 = function(values) {
434
+ return annotate(values, location());
435
+ };
414
436
  var peg$f27 = function() {
415
437
  return annotate([ops.literal, parseInt(text())], location());
416
438
  };
417
- var peg$f28 = function(pipeline) {
418
- return annotate([ops.lambda, ["_"], pipeline], location());
439
+ var peg$f28 = function(values) {
440
+ return annotate(values, location());
419
441
  };
420
- var peg$f29 = function(path) {
421
- return annotate(path ?? [], location());
442
+ var peg$f29 = function(head, tail) {
443
+ return tail.length === 0
444
+ ? head
445
+ : annotate(
446
+ [ops.logicalAnd, downgradeReference(head), ...makeDeferredArguments(tail)],
447
+ location()
448
+ );
422
449
  };
423
- var peg$f30 = function(values) {
424
- return annotate(values, location());
450
+ var peg$f30 = function(head, tail) {
451
+ return tail.length === 0
452
+ ? head
453
+ : annotate(
454
+ [ops.logicalOr, downgradeReference(head), ...makeDeferredArguments(tail)],
455
+ location()
456
+ );
425
457
  };
426
458
  var peg$f31 = function() { return null; };
427
459
  var peg$f32 = function(at, chars) {
428
460
  return annotate([ops.builtin, (at ?? "") + chars.join("") + ":"], location());
429
461
  };
430
- var peg$f33 = function(fn, path) {
431
- return annotate(makeFunctionCall(fn, [path], location()), location());
432
- };
433
- var peg$f34 = function(fn, path) {
434
- return annotate(makeFunctionCall(fn, [path], location()), location());
462
+ var peg$f33 = function(head, tail) {
463
+ return tail.length === 0
464
+ ? head
465
+ : annotate(
466
+ [ops.nullishCoalescing, downgradeReference(head), ...makeDeferredArguments(tail)],
467
+ location()
468
+ );
435
469
  };
436
- var peg$f35 = function(entries) {
470
+ var peg$f34 = function(entries) {
437
471
  return annotate(makeObject(entries ?? [], ops.object), location());
438
472
  };
439
- var peg$f36 = function(entries) {
473
+ var peg$f35 = function(entries) {
440
474
  return annotate(entries, location());
441
475
  };
442
- var peg$f37 = function(key, pipeline) {
476
+ var peg$f36 = function(key, pipeline) {
443
477
  return annotate(
444
478
  makeProperty(key, annotate([ops.getter, pipeline], location())),
445
479
  location()
446
480
  );
447
481
  };
448
- var peg$f38 = function(hiddenKey) { return hiddenKey.join(""); };
449
- var peg$f39 = function(key, pipeline) {
482
+ var peg$f37 = function(hiddenKey) { return hiddenKey.join(""); };
483
+ var peg$f38 = function(key, pipeline) {
450
484
  return annotate(makeProperty(key, pipeline), location());
451
485
  };
452
- var peg$f40 = function(key) {
486
+ var peg$f39 = function(key) {
453
487
  return annotate([key, [ops.inherited, key]], location());
454
488
  };
455
- var peg$f41 = function(identifier, slash) {
489
+ var peg$f40 = function(identifier, slash) {
456
490
  return identifier + (slash ?? "");
457
491
  };
458
- var peg$f42 = function(string) {
492
+ var peg$f41 = function(string) {
459
493
  // Remove `ops.literal` from the string code
460
494
  return string[1];
461
495
  };
462
- var peg$f43 = function(parameters, pipeline) {
463
- return annotate([ops.lambda, parameters ?? [], pipeline], location());
464
- };
465
- var peg$f44 = function(list) {
496
+ var peg$f42 = function(list) {
466
497
  return annotate(list ?? [undefined], location());
467
498
  };
468
- var peg$f45 = function(head, tail) {
469
- let path = tail ? [...head, tail] : head;
470
- // Remove parts for consecutive slashes
471
- path = path.filter((part) => part[1] !== "/");
472
- return annotate(path, location());
499
+ var peg$f43 = function(segments) {
500
+ // Drop empty segments that represent consecutive or final slashes
501
+ segments = segments.filter(segment => segment);
502
+ return annotate(segments, location());
473
503
  };
474
- var peg$f46 = function(head, tail) {
475
- let path = tail ? [...head, tail] : head;
476
- // Remove parts for consecutive slashes
477
- path = path.filter((part) => part[1] !== "/");
478
- return annotate(path, location());
479
- };
480
- var peg$f47 = function(chars) {
481
- return annotate([ops.literal, chars.join("") + "/"], location());
482
- };
483
- var peg$f48 = function(chars) {
484
- return annotate([ops.literal, chars.join("")], location());
504
+ var peg$f44 = function(path) {
505
+ return annotate([ops.traverse, ...path], location());
506
+ };
507
+ var peg$f45 = function(chars, slashFollows) {
508
+ // Append a trailing slash if one follows (but don't consume it)
509
+ const key = chars.join("") + (slashFollows ? "/" : "");
510
+ return annotate([ops.literal, key], location());
485
511
  };
486
- var peg$f49 = function(head, tail) {
487
- return tail.length === 0
488
- ? head
489
- : annotate(makePipeline([head, ...tail]), location());
512
+ var peg$f46 = function(head, tail) {
513
+ return tail.reduce(makePipeline, downgradeReference(head));
514
+ };
515
+ var peg$f47 = function(fn, host, path) {
516
+ const keys = annotate([host, ...(path ?? [])], location());
517
+ return annotate(makeCall(fn, keys), location());
490
518
  };
491
- var peg$f50 = function(key) {
492
- return annotate([ops.scope, key], location());
519
+ var peg$f48 = function(fn, reference) {
520
+ const literal = annotate([ops.literal, reference[1]], reference.location);
521
+ return annotate(makeCall(fn, [literal]), location());
493
522
  };
494
- var peg$f51 = function(ref, path) {
495
- const head = [ops.scope, `${ ref[1] }/`];
496
- head.location = ref.location;
497
- return annotate([ops.traverse, head, ...(path ?? [])], location());
523
+ var peg$f49 = function(key) {
524
+ return annotate([ops.rootDirectory, key], location());
525
+ };
526
+ var peg$f50 = function() {
527
+ return annotate([ops.rootDirectory], location());
528
+ };
529
+ var peg$f51 = function(identifier, slashFollows) {
530
+ const id = identifier + (slashFollows ? "/" : "");
531
+ return annotate(makeReference(id), location());
532
+ };
533
+ var peg$f52 = function() {
534
+ return true;
498
535
  };
499
- var peg$f52 = function() { return null; };
500
536
  var peg$f53 = function() { return null; };
501
- var peg$f54 = function(chars) {
537
+ var peg$f54 = function(definition) {
538
+ return annotate([ops.lambda, ["_"], definition], location());
539
+ };
540
+ var peg$f55 = function() { return null; };
541
+ var peg$f56 = function(chars) {
502
542
  return annotate([ops.literal, chars.join("")], location());
503
543
  };
504
- var peg$f55 = function(value) {
544
+ var peg$f57 = function(value) {
505
545
  return annotate([ops.spread, value], location());
506
546
  };
507
- var peg$f56 = function(tag, contents) {
508
- return annotate(makeTemplate(tag, contents[0], contents[1]), location());
509
- };
510
- var peg$f57 = function(contents) {
547
+ var peg$f58 = function(contents) {
511
548
  return annotate([ops.lambda, ["_"], contents], location());
512
549
  };
513
- var peg$f58 = function(head, tail) {
550
+ var peg$f59 = function(head, tail) {
514
551
  return annotate(makeTemplate(ops.template, head, tail), location());
515
552
  };
516
- var peg$f59 = function(chars) {
553
+ var peg$f60 = function(chars) {
517
554
  return chars.join("");
518
555
  };
519
- var peg$f60 = function(contents) {
556
+ var peg$f61 = function(contents) {
520
557
  return annotate(makeTemplate(ops.template, contents[0], contents[1]), location());
521
558
  };
522
- var peg$f61 = function(chars) {
559
+ var peg$f62 = function(chars) {
523
560
  return chars.join("");
524
561
  };
562
+ var peg$f63 = function(expression) {
563
+ return annotate(expression, location());
564
+ };
565
+ var peg$f64 = function(operator, expression) {
566
+ return annotate(makeUnaryOperatorCall(operator, expression), location());
567
+ };
525
568
  var peg$currPos = options.peg$currPos | 0;
526
569
  var peg$savedPos = peg$currPos;
527
570
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -713,83 +756,37 @@ function peg$parse(input, options) {
713
756
  return s0;
714
757
  }
715
758
 
716
- function peg$parseabsoluteFilePath() {
717
- var s0, s1, s2;
718
-
719
- peg$silentFails++;
720
- s0 = peg$currPos;
721
- s1 = peg$currPos;
722
- peg$silentFails++;
723
- if (input.substr(peg$currPos, 2) === peg$c0) {
724
- s2 = peg$c0;
725
- peg$currPos += 2;
726
- } else {
727
- s2 = peg$FAILED;
728
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
729
- }
730
- peg$silentFails--;
731
- if (s2 === peg$FAILED) {
732
- s1 = undefined;
733
- } else {
734
- peg$currPos = s1;
735
- s1 = peg$FAILED;
736
- }
737
- if (s1 !== peg$FAILED) {
738
- s2 = peg$parseleadingSlashPath();
739
- if (s2 !== peg$FAILED) {
740
- peg$savedPos = s0;
741
- s0 = peg$f1(s2);
742
- } else {
743
- peg$currPos = s0;
744
- s0 = peg$FAILED;
745
- }
746
- } else {
747
- peg$currPos = s0;
748
- s0 = peg$FAILED;
749
- }
750
- peg$silentFails--;
751
- if (s0 === peg$FAILED) {
752
- s1 = peg$FAILED;
753
- if (peg$silentFails === 0) { peg$fail(peg$e0); }
754
- }
755
-
756
- return s0;
757
- }
758
-
759
- function peg$parseargs() {
759
+ function peg$parsearguments() {
760
760
  var s0, s1;
761
761
 
762
762
  peg$silentFails++;
763
- s0 = peg$parseparensArgs();
763
+ s0 = peg$parseparenthesesArguments();
764
764
  if (s0 === peg$FAILED) {
765
- s0 = peg$currPos;
766
- s1 = peg$parseleadingSlashPath();
767
- if (s1 !== peg$FAILED) {
768
- peg$savedPos = s0;
769
- s1 = peg$f2(s1);
765
+ s0 = peg$parsepathArguments();
766
+ if (s0 === peg$FAILED) {
767
+ s0 = peg$parsetemplateLiteral();
770
768
  }
771
- s0 = s1;
772
769
  }
773
770
  peg$silentFails--;
774
771
  if (s0 === peg$FAILED) {
775
772
  s1 = peg$FAILED;
776
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
773
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
777
774
  }
778
775
 
779
776
  return s0;
780
777
  }
781
778
 
782
- function peg$parsearray() {
779
+ function peg$parsearrayLiteral() {
783
780
  var s0, s1, s2, s3, s4, s5;
784
781
 
785
782
  peg$silentFails++;
786
783
  s0 = peg$currPos;
787
784
  if (input.charCodeAt(peg$currPos) === 91) {
788
- s1 = peg$c1;
785
+ s1 = peg$c0;
789
786
  peg$currPos++;
790
787
  } else {
791
788
  s1 = peg$FAILED;
792
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
789
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
793
790
  }
794
791
  if (s1 !== peg$FAILED) {
795
792
  s2 = peg$parse__();
@@ -801,7 +798,7 @@ function peg$parse(input, options) {
801
798
  s5 = peg$parseclosingBracket();
802
799
  if (s5 !== peg$FAILED) {
803
800
  peg$savedPos = s0;
804
- s0 = peg$f3(s3);
801
+ s0 = peg$f1(s3);
805
802
  } else {
806
803
  peg$currPos = s0;
807
804
  s0 = peg$FAILED;
@@ -813,7 +810,7 @@ function peg$parse(input, options) {
813
810
  peg$silentFails--;
814
811
  if (s0 === peg$FAILED) {
815
812
  s1 = peg$FAILED;
816
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
813
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
817
814
  }
818
815
 
819
816
  return s0;
@@ -854,7 +851,7 @@ function peg$parse(input, options) {
854
851
  s2 = null;
855
852
  }
856
853
  peg$savedPos = s0;
857
- s0 = peg$f4(s1);
854
+ s0 = peg$f2(s1);
858
855
  } else {
859
856
  peg$currPos = s0;
860
857
  s0 = peg$FAILED;
@@ -868,37 +865,87 @@ function peg$parse(input, options) {
868
865
 
869
866
  s0 = peg$parsespread();
870
867
  if (s0 === peg$FAILED) {
871
- s0 = peg$parsepipeline();
868
+ s0 = peg$parsepipelineExpression();
872
869
  }
873
870
 
874
871
  return s0;
875
872
  }
876
873
 
877
- function peg$parsecallTarget() {
878
- var s0, s1;
874
+ function peg$parsearrowFunction() {
875
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
879
876
 
880
- peg$silentFails++;
881
- s0 = peg$parseabsoluteFilePath();
882
- if (s0 === peg$FAILED) {
883
- s0 = peg$parsescopeTraverse();
884
- if (s0 === peg$FAILED) {
885
- s0 = peg$parsearray();
886
- if (s0 === peg$FAILED) {
887
- s0 = peg$parseobject();
888
- if (s0 === peg$FAILED) {
889
- s0 = peg$parsegroup();
890
- if (s0 === peg$FAILED) {
891
- s0 = peg$parsenamespacePath();
892
- if (s0 === peg$FAILED) {
893
- s0 = peg$parsenamespace();
894
- if (s0 === peg$FAILED) {
895
- s0 = peg$parsefunctionReference();
896
- }
897
- }
898
- }
877
+ s0 = peg$currPos;
878
+ if (input.charCodeAt(peg$currPos) === 40) {
879
+ s1 = peg$c1;
880
+ peg$currPos++;
881
+ } else {
882
+ s1 = peg$FAILED;
883
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
884
+ }
885
+ if (s1 !== peg$FAILED) {
886
+ s2 = peg$parse__();
887
+ s3 = peg$parseidentifierList();
888
+ if (s3 === peg$FAILED) {
889
+ s3 = null;
890
+ }
891
+ s4 = peg$parse__();
892
+ if (input.charCodeAt(peg$currPos) === 41) {
893
+ s5 = peg$c2;
894
+ peg$currPos++;
895
+ } else {
896
+ s5 = peg$FAILED;
897
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
898
+ }
899
+ if (s5 !== peg$FAILED) {
900
+ s6 = peg$parse__();
901
+ s7 = peg$parsedoubleArrow();
902
+ if (s7 !== peg$FAILED) {
903
+ s8 = peg$parse__();
904
+ s9 = peg$parsepipelineExpression();
905
+ if (s9 !== peg$FAILED) {
906
+ peg$savedPos = s0;
907
+ s0 = peg$f3(s3, s9);
908
+ } else {
909
+ peg$currPos = s0;
910
+ s0 = peg$FAILED;
899
911
  }
912
+ } else {
913
+ peg$currPos = s0;
914
+ s0 = peg$FAILED;
900
915
  }
916
+ } else {
917
+ peg$currPos = s0;
918
+ s0 = peg$FAILED;
919
+ }
920
+ } else {
921
+ peg$currPos = s0;
922
+ s0 = peg$FAILED;
923
+ }
924
+ if (s0 === peg$FAILED) {
925
+ s0 = peg$parseconditionalExpression();
926
+ }
927
+
928
+ return s0;
929
+ }
930
+
931
+ function peg$parsecallExpression() {
932
+ var s0, s1, s2, s3;
933
+
934
+ peg$silentFails++;
935
+ s0 = peg$currPos;
936
+ s1 = peg$parseprotocolExpression();
937
+ if (s1 !== peg$FAILED) {
938
+ s2 = [];
939
+ s3 = peg$parsearguments();
940
+ while (s3 !== peg$FAILED) {
941
+ s2.push(s3);
942
+ s3 = peg$parsearguments();
901
943
  }
944
+ peg$savedPos = s0;
945
+ s0 = peg$f4(s1, s2);
946
+ } else {
947
+ peg$currPos = s0;
948
+ s0 = peg$FAILED;
902
949
  }
903
950
  peg$silentFails--;
904
951
  if (s0 === peg$FAILED) {
@@ -913,7 +960,7 @@ function peg$parse(input, options) {
913
960
  var s0, s1;
914
961
 
915
962
  if (input.charCodeAt(peg$currPos) === 125) {
916
- s0 = peg$c2;
963
+ s0 = peg$c3;
917
964
  peg$currPos++;
918
965
  } else {
919
966
  s0 = peg$FAILED;
@@ -943,7 +990,7 @@ function peg$parse(input, options) {
943
990
  var s0, s1;
944
991
 
945
992
  if (input.charCodeAt(peg$currPos) === 93) {
946
- s0 = peg$c3;
993
+ s0 = peg$c4;
947
994
  peg$currPos++;
948
995
  } else {
949
996
  s0 = peg$FAILED;
@@ -969,15 +1016,15 @@ function peg$parse(input, options) {
969
1016
  return s0;
970
1017
  }
971
1018
 
972
- function peg$parseclosingParen() {
1019
+ function peg$parseclosingParenthesis() {
973
1020
  var s0, s1;
974
1021
 
975
1022
  if (input.charCodeAt(peg$currPos) === 41) {
976
- s0 = peg$c4;
1023
+ s0 = peg$c2;
977
1024
  peg$currPos++;
978
1025
  } else {
979
1026
  s0 = peg$FAILED;
980
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
1027
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
981
1028
  }
982
1029
  if (s0 === peg$FAILED) {
983
1030
  s0 = peg$currPos;
@@ -1010,7 +1057,66 @@ function peg$parse(input, options) {
1010
1057
  peg$silentFails--;
1011
1058
  if (s0 === peg$FAILED) {
1012
1059
  s1 = peg$FAILED;
1013
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
1060
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1061
+ }
1062
+
1063
+ return s0;
1064
+ }
1065
+
1066
+ function peg$parseconditionalExpression() {
1067
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1068
+
1069
+ s0 = peg$currPos;
1070
+ s1 = peg$parselogicalOrExpression();
1071
+ if (s1 !== peg$FAILED) {
1072
+ s2 = peg$parse__();
1073
+ if (input.charCodeAt(peg$currPos) === 63) {
1074
+ s3 = peg$c5;
1075
+ peg$currPos++;
1076
+ } else {
1077
+ s3 = peg$FAILED;
1078
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1079
+ }
1080
+ if (s3 !== peg$FAILED) {
1081
+ s4 = peg$parse__();
1082
+ s5 = peg$parsepipelineExpression();
1083
+ if (s5 !== peg$FAILED) {
1084
+ s6 = peg$parse__();
1085
+ if (input.charCodeAt(peg$currPos) === 58) {
1086
+ s7 = peg$c6;
1087
+ peg$currPos++;
1088
+ } else {
1089
+ s7 = peg$FAILED;
1090
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1091
+ }
1092
+ if (s7 !== peg$FAILED) {
1093
+ s8 = peg$parse__();
1094
+ s9 = peg$parsepipelineExpression();
1095
+ if (s9 !== peg$FAILED) {
1096
+ peg$savedPos = s0;
1097
+ s0 = peg$f8(s1, s5, s9);
1098
+ } else {
1099
+ peg$currPos = s0;
1100
+ s0 = peg$FAILED;
1101
+ }
1102
+ } else {
1103
+ peg$currPos = s0;
1104
+ s0 = peg$FAILED;
1105
+ }
1106
+ } else {
1107
+ peg$currPos = s0;
1108
+ s0 = peg$FAILED;
1109
+ }
1110
+ } else {
1111
+ peg$currPos = s0;
1112
+ s0 = peg$FAILED;
1113
+ }
1114
+ } else {
1115
+ peg$currPos = s0;
1116
+ s0 = peg$FAILED;
1117
+ }
1118
+ if (s0 === peg$FAILED) {
1119
+ s0 = peg$parselogicalOrExpression();
1014
1120
  }
1015
1121
 
1016
1122
  return s0;
@@ -1026,7 +1132,7 @@ function peg$parse(input, options) {
1026
1132
  peg$currPos++;
1027
1133
  } else {
1028
1134
  s2 = peg$FAILED;
1029
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1135
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1030
1136
  }
1031
1137
  if (s2 !== peg$FAILED) {
1032
1138
  while (s2 !== peg$FAILED) {
@@ -1036,7 +1142,7 @@ function peg$parse(input, options) {
1036
1142
  peg$currPos++;
1037
1143
  } else {
1038
1144
  s2 = peg$FAILED;
1039
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1145
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1040
1146
  }
1041
1147
  }
1042
1148
  } else {
@@ -1056,19 +1162,19 @@ function peg$parse(input, options) {
1056
1162
  var s0;
1057
1163
 
1058
1164
  if (input.charCodeAt(peg$currPos) === 8658) {
1059
- s0 = peg$c5;
1165
+ s0 = peg$c7;
1060
1166
  peg$currPos++;
1061
1167
  } else {
1062
1168
  s0 = peg$FAILED;
1063
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1169
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
1064
1170
  }
1065
1171
  if (s0 === peg$FAILED) {
1066
- if (input.substr(peg$currPos, 2) === peg$c6) {
1067
- s0 = peg$c6;
1172
+ if (input.substr(peg$currPos, 2) === peg$c8) {
1173
+ s0 = peg$c8;
1068
1174
  peg$currPos += 2;
1069
1175
  } else {
1070
1176
  s0 = peg$FAILED;
1071
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
1177
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1072
1178
  }
1073
1179
  }
1074
1180
 
@@ -1081,11 +1187,11 @@ function peg$parse(input, options) {
1081
1187
  peg$silentFails++;
1082
1188
  s0 = peg$currPos;
1083
1189
  if (input.charCodeAt(peg$currPos) === 34) {
1084
- s1 = peg$c7;
1190
+ s1 = peg$c9;
1085
1191
  peg$currPos++;
1086
1192
  } else {
1087
1193
  s1 = peg$FAILED;
1088
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1194
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1089
1195
  }
1090
1196
  if (s1 !== peg$FAILED) {
1091
1197
  s2 = [];
@@ -1095,15 +1201,15 @@ function peg$parse(input, options) {
1095
1201
  s3 = peg$parsedoubleQuoteStringChar();
1096
1202
  }
1097
1203
  if (input.charCodeAt(peg$currPos) === 34) {
1098
- s3 = peg$c7;
1204
+ s3 = peg$c9;
1099
1205
  peg$currPos++;
1100
1206
  } else {
1101
1207
  s3 = peg$FAILED;
1102
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1208
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1103
1209
  }
1104
1210
  if (s3 !== peg$FAILED) {
1105
1211
  peg$savedPos = s0;
1106
- s0 = peg$f8(s2);
1212
+ s0 = peg$f9(s2);
1107
1213
  } else {
1108
1214
  peg$currPos = s0;
1109
1215
  s0 = peg$FAILED;
@@ -1115,7 +1221,7 @@ function peg$parse(input, options) {
1115
1221
  peg$silentFails--;
1116
1222
  if (s0 === peg$FAILED) {
1117
1223
  s1 = peg$FAILED;
1118
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1224
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1119
1225
  }
1120
1226
 
1121
1227
  return s0;
@@ -1128,11 +1234,11 @@ function peg$parse(input, options) {
1128
1234
  s1 = peg$currPos;
1129
1235
  peg$silentFails++;
1130
1236
  if (input.charCodeAt(peg$currPos) === 34) {
1131
- s2 = peg$c7;
1237
+ s2 = peg$c9;
1132
1238
  peg$currPos++;
1133
1239
  } else {
1134
1240
  s2 = peg$FAILED;
1135
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1241
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1136
1242
  }
1137
1243
  if (s2 === peg$FAILED) {
1138
1244
  s2 = peg$parsenewLine();
@@ -1160,55 +1266,116 @@ function peg$parse(input, options) {
1160
1266
  return s0;
1161
1267
  }
1162
1268
 
1163
- function peg$parsedoubleSlashPath() {
1164
- var s0, s1, s2, s3;
1269
+ function peg$parseellipsis() {
1270
+ var s0;
1165
1271
 
1166
- s0 = peg$currPos;
1167
- if (input.substr(peg$currPos, 2) === peg$c0) {
1168
- s1 = peg$c0;
1169
- peg$currPos += 2;
1272
+ if (input.substr(peg$currPos, 3) === peg$c10) {
1273
+ s0 = peg$c10;
1274
+ peg$currPos += 3;
1170
1275
  } else {
1171
- s1 = peg$FAILED;
1172
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
1276
+ s0 = peg$FAILED;
1277
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
1173
1278
  }
1174
- if (s1 !== peg$FAILED) {
1175
- s2 = peg$parsehost();
1176
- if (s2 !== peg$FAILED) {
1177
- s3 = peg$parsepath();
1178
- if (s3 === peg$FAILED) {
1179
- s3 = null;
1180
- }
1181
- peg$savedPos = s0;
1182
- s0 = peg$f9(s2, s3);
1279
+ if (s0 === peg$FAILED) {
1280
+ if (input.charCodeAt(peg$currPos) === 8230) {
1281
+ s0 = peg$c11;
1282
+ peg$currPos++;
1183
1283
  } else {
1184
- peg$currPos = s0;
1185
1284
  s0 = peg$FAILED;
1285
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1186
1286
  }
1187
- } else {
1188
- peg$currPos = s0;
1189
- s0 = peg$FAILED;
1190
1287
  }
1191
1288
 
1192
1289
  return s0;
1193
1290
  }
1194
1291
 
1195
- function peg$parseellipsis() {
1196
- var s0;
1292
+ function peg$parseequalityExpression() {
1293
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1294
+
1295
+ s0 = peg$currPos;
1296
+ s1 = peg$parseunaryExpression();
1297
+ if (s1 !== peg$FAILED) {
1298
+ s2 = [];
1299
+ s3 = peg$currPos;
1300
+ s4 = peg$parse__();
1301
+ s5 = peg$parseequalityOperator();
1302
+ if (s5 !== peg$FAILED) {
1303
+ s6 = peg$parse__();
1304
+ s7 = peg$parseunaryExpression();
1305
+ if (s7 !== peg$FAILED) {
1306
+ s3 = [ s5, s7 ];
1307
+ } else {
1308
+ peg$currPos = s3;
1309
+ s3 = peg$FAILED;
1310
+ }
1311
+ } else {
1312
+ peg$currPos = s3;
1313
+ s3 = peg$FAILED;
1314
+ }
1315
+ while (s3 !== peg$FAILED) {
1316
+ s2.push(s3);
1317
+ s3 = peg$currPos;
1318
+ s4 = peg$parse__();
1319
+ s5 = peg$parseequalityOperator();
1320
+ if (s5 !== peg$FAILED) {
1321
+ s6 = peg$parse__();
1322
+ s7 = peg$parseunaryExpression();
1323
+ if (s7 !== peg$FAILED) {
1324
+ s3 = [ s5, s7 ];
1325
+ } else {
1326
+ peg$currPos = s3;
1327
+ s3 = peg$FAILED;
1328
+ }
1329
+ } else {
1330
+ peg$currPos = s3;
1331
+ s3 = peg$FAILED;
1332
+ }
1333
+ }
1334
+ peg$savedPos = s0;
1335
+ s0 = peg$f10(s1, s2);
1336
+ } else {
1337
+ peg$currPos = s0;
1338
+ s0 = peg$FAILED;
1339
+ }
1340
+
1341
+ return s0;
1342
+ }
1343
+
1344
+ function peg$parseequalityOperator() {
1345
+ var s0;
1197
1346
 
1198
- if (input.substr(peg$currPos, 3) === peg$c8) {
1199
- s0 = peg$c8;
1347
+ if (input.substr(peg$currPos, 3) === peg$c12) {
1348
+ s0 = peg$c12;
1200
1349
  peg$currPos += 3;
1201
1350
  } else {
1202
1351
  s0 = peg$FAILED;
1203
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1352
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1204
1353
  }
1205
1354
  if (s0 === peg$FAILED) {
1206
- if (input.charCodeAt(peg$currPos) === 8230) {
1207
- s0 = peg$c9;
1208
- peg$currPos++;
1355
+ if (input.substr(peg$currPos, 3) === peg$c13) {
1356
+ s0 = peg$c13;
1357
+ peg$currPos += 3;
1209
1358
  } else {
1210
1359
  s0 = peg$FAILED;
1211
- if (peg$silentFails === 0) { peg$fail(peg$e17); }
1360
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1361
+ }
1362
+ if (s0 === peg$FAILED) {
1363
+ if (input.substr(peg$currPos, 2) === peg$c14) {
1364
+ s0 = peg$c14;
1365
+ peg$currPos += 2;
1366
+ } else {
1367
+ s0 = peg$FAILED;
1368
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1369
+ }
1370
+ if (s0 === peg$FAILED) {
1371
+ if (input.substr(peg$currPos, 2) === peg$c15) {
1372
+ s0 = peg$c15;
1373
+ peg$currPos += 2;
1374
+ } else {
1375
+ s0 = peg$FAILED;
1376
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1377
+ }
1378
+ }
1212
1379
  }
1213
1380
  }
1214
1381
 
@@ -1220,110 +1387,110 @@ function peg$parse(input, options) {
1220
1387
 
1221
1388
  peg$silentFails++;
1222
1389
  s0 = peg$currPos;
1223
- if (input.substr(peg$currPos, 2) === peg$c10) {
1224
- s1 = peg$c10;
1390
+ if (input.substr(peg$currPos, 2) === peg$c16) {
1391
+ s1 = peg$c16;
1225
1392
  peg$currPos += 2;
1226
1393
  } else {
1227
1394
  s1 = peg$FAILED;
1228
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
1395
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1229
1396
  }
1230
1397
  if (s1 !== peg$FAILED) {
1231
1398
  peg$savedPos = s0;
1232
- s1 = peg$f10();
1399
+ s1 = peg$f11();
1233
1400
  }
1234
1401
  s0 = s1;
1235
1402
  if (s0 === peg$FAILED) {
1236
1403
  s0 = peg$currPos;
1237
- if (input.substr(peg$currPos, 2) === peg$c11) {
1238
- s1 = peg$c11;
1404
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1405
+ s1 = peg$c17;
1239
1406
  peg$currPos += 2;
1240
1407
  } else {
1241
1408
  s1 = peg$FAILED;
1242
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1409
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1243
1410
  }
1244
1411
  if (s1 !== peg$FAILED) {
1245
1412
  peg$savedPos = s0;
1246
- s1 = peg$f11();
1413
+ s1 = peg$f12();
1247
1414
  }
1248
1415
  s0 = s1;
1249
1416
  if (s0 === peg$FAILED) {
1250
1417
  s0 = peg$currPos;
1251
- if (input.substr(peg$currPos, 2) === peg$c12) {
1252
- s1 = peg$c12;
1418
+ if (input.substr(peg$currPos, 2) === peg$c18) {
1419
+ s1 = peg$c18;
1253
1420
  peg$currPos += 2;
1254
1421
  } else {
1255
1422
  s1 = peg$FAILED;
1256
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
1423
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1257
1424
  }
1258
1425
  if (s1 !== peg$FAILED) {
1259
1426
  peg$savedPos = s0;
1260
- s1 = peg$f12();
1427
+ s1 = peg$f13();
1261
1428
  }
1262
1429
  s0 = s1;
1263
1430
  if (s0 === peg$FAILED) {
1264
1431
  s0 = peg$currPos;
1265
- if (input.substr(peg$currPos, 2) === peg$c13) {
1266
- s1 = peg$c13;
1432
+ if (input.substr(peg$currPos, 2) === peg$c19) {
1433
+ s1 = peg$c19;
1267
1434
  peg$currPos += 2;
1268
1435
  } else {
1269
1436
  s1 = peg$FAILED;
1270
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
1437
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1271
1438
  }
1272
1439
  if (s1 !== peg$FAILED) {
1273
1440
  peg$savedPos = s0;
1274
- s1 = peg$f13();
1441
+ s1 = peg$f14();
1275
1442
  }
1276
1443
  s0 = s1;
1277
1444
  if (s0 === peg$FAILED) {
1278
1445
  s0 = peg$currPos;
1279
- if (input.substr(peg$currPos, 2) === peg$c14) {
1280
- s1 = peg$c14;
1446
+ if (input.substr(peg$currPos, 2) === peg$c20) {
1447
+ s1 = peg$c20;
1281
1448
  peg$currPos += 2;
1282
1449
  } else {
1283
1450
  s1 = peg$FAILED;
1284
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1451
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1285
1452
  }
1286
1453
  if (s1 !== peg$FAILED) {
1287
1454
  peg$savedPos = s0;
1288
- s1 = peg$f14();
1455
+ s1 = peg$f15();
1289
1456
  }
1290
1457
  s0 = s1;
1291
1458
  if (s0 === peg$FAILED) {
1292
1459
  s0 = peg$currPos;
1293
- if (input.substr(peg$currPos, 2) === peg$c15) {
1294
- s1 = peg$c15;
1460
+ if (input.substr(peg$currPos, 2) === peg$c21) {
1461
+ s1 = peg$c21;
1295
1462
  peg$currPos += 2;
1296
1463
  } else {
1297
1464
  s1 = peg$FAILED;
1298
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
1465
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1299
1466
  }
1300
1467
  if (s1 !== peg$FAILED) {
1301
1468
  peg$savedPos = s0;
1302
- s1 = peg$f15();
1469
+ s1 = peg$f16();
1303
1470
  }
1304
1471
  s0 = s1;
1305
1472
  if (s0 === peg$FAILED) {
1306
1473
  s0 = peg$currPos;
1307
- if (input.substr(peg$currPos, 2) === peg$c16) {
1308
- s1 = peg$c16;
1474
+ if (input.substr(peg$currPos, 2) === peg$c22) {
1475
+ s1 = peg$c22;
1309
1476
  peg$currPos += 2;
1310
1477
  } else {
1311
1478
  s1 = peg$FAILED;
1312
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
1479
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1313
1480
  }
1314
1481
  if (s1 !== peg$FAILED) {
1315
1482
  peg$savedPos = s0;
1316
- s1 = peg$f16();
1483
+ s1 = peg$f17();
1317
1484
  }
1318
1485
  s0 = s1;
1319
1486
  if (s0 === peg$FAILED) {
1320
1487
  s0 = peg$currPos;
1321
1488
  if (input.charCodeAt(peg$currPos) === 92) {
1322
- s1 = peg$c17;
1489
+ s1 = peg$c23;
1323
1490
  peg$currPos++;
1324
1491
  } else {
1325
1492
  s1 = peg$FAILED;
1326
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
1493
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1327
1494
  }
1328
1495
  if (s1 !== peg$FAILED) {
1329
1496
  if (input.length > peg$currPos) {
@@ -1353,7 +1520,7 @@ function peg$parse(input, options) {
1353
1520
  peg$silentFails--;
1354
1521
  if (s0 === peg$FAILED) {
1355
1522
  s1 = peg$FAILED;
1356
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
1523
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1357
1524
  }
1358
1525
 
1359
1526
  return s0;
@@ -1364,7 +1531,7 @@ function peg$parse(input, options) {
1364
1531
 
1365
1532
  s0 = peg$currPos;
1366
1533
  s1 = peg$parse__();
1367
- s2 = peg$parsepipeline();
1534
+ s2 = peg$parsepipelineExpression();
1368
1535
  if (s2 !== peg$FAILED) {
1369
1536
  s3 = peg$parse__();
1370
1537
  s0 = s2;
@@ -1376,7 +1543,7 @@ function peg$parse(input, options) {
1376
1543
  return s0;
1377
1544
  }
1378
1545
 
1379
- function peg$parsefloat() {
1546
+ function peg$parsefloatLiteral() {
1380
1547
  var s0, s1, s2, s3, s4;
1381
1548
 
1382
1549
  peg$silentFails++;
@@ -1390,58 +1557,17 @@ function peg$parse(input, options) {
1390
1557
  s2 = null;
1391
1558
  }
1392
1559
  if (input.charCodeAt(peg$currPos) === 46) {
1393
- s3 = peg$c18;
1560
+ s3 = peg$c24;
1394
1561
  peg$currPos++;
1395
1562
  } else {
1396
1563
  s3 = peg$FAILED;
1397
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
1564
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1398
1565
  }
1399
1566
  if (s3 !== peg$FAILED) {
1400
1567
  s4 = peg$parsedigits();
1401
1568
  if (s4 !== peg$FAILED) {
1402
1569
  peg$savedPos = s0;
1403
- s0 = peg$f17();
1404
- } else {
1405
- peg$currPos = s0;
1406
- s0 = peg$FAILED;
1407
- }
1408
- } else {
1409
- peg$currPos = s0;
1410
- s0 = peg$FAILED;
1411
- }
1412
- peg$silentFails--;
1413
- if (s0 === peg$FAILED) {
1414
- s1 = peg$FAILED;
1415
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
1416
- }
1417
-
1418
- return s0;
1419
- }
1420
-
1421
- function peg$parsefunctionComposition() {
1422
- var s0, s1, s2, s3;
1423
-
1424
- peg$silentFails++;
1425
- s0 = peg$currPos;
1426
- s1 = peg$parsecallTarget();
1427
- if (s1 !== peg$FAILED) {
1428
- s2 = [];
1429
- s3 = peg$parseargs();
1430
- if (s3 !== peg$FAILED) {
1431
- while (s3 !== peg$FAILED) {
1432
- s2.push(s3);
1433
- s3 = peg$parseargs();
1434
- }
1435
- } else {
1436
- s2 = peg$FAILED;
1437
- }
1438
- if (s2 !== peg$FAILED) {
1439
- s3 = peg$parseimplicitParensArgs();
1440
- if (s3 === peg$FAILED) {
1441
- s3 = null;
1442
- }
1443
- peg$savedPos = s0;
1444
- s0 = peg$f18(s1, s2, s3);
1570
+ s0 = peg$f18();
1445
1571
  } else {
1446
1572
  peg$currPos = s0;
1447
1573
  s0 = peg$FAILED;
@@ -1450,73 +1576,34 @@ function peg$parse(input, options) {
1450
1576
  peg$currPos = s0;
1451
1577
  s0 = peg$FAILED;
1452
1578
  }
1453
- if (s0 === peg$FAILED) {
1454
- s0 = peg$currPos;
1455
- s1 = peg$parsecallTarget();
1456
- if (s1 !== peg$FAILED) {
1457
- s2 = [];
1458
- s3 = peg$parseargs();
1459
- while (s3 !== peg$FAILED) {
1460
- s2.push(s3);
1461
- s3 = peg$parseargs();
1462
- }
1463
- s3 = peg$parseimplicitParensArgs();
1464
- if (s3 !== peg$FAILED) {
1465
- peg$savedPos = s0;
1466
- s0 = peg$f19(s1, s2, s3);
1467
- } else {
1468
- peg$currPos = s0;
1469
- s0 = peg$FAILED;
1470
- }
1471
- } else {
1472
- peg$currPos = s0;
1473
- s0 = peg$FAILED;
1474
- }
1475
- }
1476
1579
  peg$silentFails--;
1477
1580
  if (s0 === peg$FAILED) {
1478
1581
  s1 = peg$FAILED;
1479
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1480
- }
1481
-
1482
- return s0;
1483
- }
1484
-
1485
- function peg$parsefunctionReference() {
1486
- var s0, s1;
1487
-
1488
- s0 = peg$currPos;
1489
- s1 = peg$parsescopeReference();
1490
- if (s1 !== peg$FAILED) {
1491
- peg$savedPos = s0;
1492
- s1 = peg$f20(s1);
1582
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1493
1583
  }
1494
- s0 = s1;
1495
1584
 
1496
1585
  return s0;
1497
1586
  }
1498
1587
 
1499
1588
  function peg$parsegroup() {
1500
- var s0, s1, s2, s3, s4, s5;
1589
+ var s0, s1, s2, s3;
1501
1590
 
1502
1591
  peg$silentFails++;
1503
1592
  s0 = peg$currPos;
1504
1593
  if (input.charCodeAt(peg$currPos) === 40) {
1505
- s1 = peg$c19;
1594
+ s1 = peg$c1;
1506
1595
  peg$currPos++;
1507
1596
  } else {
1508
1597
  s1 = peg$FAILED;
1509
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
1598
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
1510
1599
  }
1511
1600
  if (s1 !== peg$FAILED) {
1512
- s2 = peg$parse__();
1513
- s3 = peg$parsepipeline();
1514
- if (s3 !== peg$FAILED) {
1515
- s4 = peg$parse__();
1516
- s5 = peg$parseclosingParen();
1517
- if (s5 !== peg$FAILED) {
1601
+ s2 = peg$parseexpression();
1602
+ if (s2 !== peg$FAILED) {
1603
+ s3 = peg$parseclosingParenthesis();
1604
+ if (s3 !== peg$FAILED) {
1518
1605
  peg$savedPos = s0;
1519
- s0 = peg$f21(s3);
1606
+ s0 = peg$f19(s2);
1520
1607
  } else {
1521
1608
  peg$currPos = s0;
1522
1609
  s0 = peg$FAILED;
@@ -1532,7 +1619,7 @@ function peg$parse(input, options) {
1532
1619
  peg$silentFails--;
1533
1620
  if (s0 === peg$FAILED) {
1534
1621
  s1 = peg$FAILED;
1535
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
1622
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1536
1623
  }
1537
1624
 
1538
1625
  return s0;
@@ -1544,11 +1631,11 @@ function peg$parse(input, options) {
1544
1631
  peg$silentFails++;
1545
1632
  s0 = peg$currPos;
1546
1633
  if (input.charCodeAt(peg$currPos) === 171) {
1547
- s1 = peg$c20;
1634
+ s1 = peg$c25;
1548
1635
  peg$currPos++;
1549
1636
  } else {
1550
1637
  s1 = peg$FAILED;
1551
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
1638
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
1552
1639
  }
1553
1640
  if (s1 !== peg$FAILED) {
1554
1641
  s2 = [];
@@ -1558,15 +1645,15 @@ function peg$parse(input, options) {
1558
1645
  s3 = peg$parseguillemetStringChar();
1559
1646
  }
1560
1647
  if (input.charCodeAt(peg$currPos) === 187) {
1561
- s3 = peg$c21;
1648
+ s3 = peg$c26;
1562
1649
  peg$currPos++;
1563
1650
  } else {
1564
1651
  s3 = peg$FAILED;
1565
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1652
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1566
1653
  }
1567
1654
  if (s3 !== peg$FAILED) {
1568
1655
  peg$savedPos = s0;
1569
- s0 = peg$f22(s2);
1656
+ s0 = peg$f20(s2);
1570
1657
  } else {
1571
1658
  peg$currPos = s0;
1572
1659
  s0 = peg$FAILED;
@@ -1578,7 +1665,7 @@ function peg$parse(input, options) {
1578
1665
  peg$silentFails--;
1579
1666
  if (s0 === peg$FAILED) {
1580
1667
  s1 = peg$FAILED;
1581
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
1668
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1582
1669
  }
1583
1670
 
1584
1671
  return s0;
@@ -1591,11 +1678,11 @@ function peg$parse(input, options) {
1591
1678
  s1 = peg$currPos;
1592
1679
  peg$silentFails++;
1593
1680
  if (input.charCodeAt(peg$currPos) === 187) {
1594
- s2 = peg$c21;
1681
+ s2 = peg$c26;
1595
1682
  peg$currPos++;
1596
1683
  } else {
1597
1684
  s2 = peg$FAILED;
1598
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1685
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1599
1686
  }
1600
1687
  if (s2 === peg$FAILED) {
1601
1688
  s2 = peg$parsenewLine();
@@ -1623,20 +1710,20 @@ function peg$parse(input, options) {
1623
1710
  return s0;
1624
1711
  }
1625
1712
 
1626
- function peg$parsehomeTree() {
1713
+ function peg$parsehomeDirectory() {
1627
1714
  var s0, s1;
1628
1715
 
1629
1716
  s0 = peg$currPos;
1630
1717
  if (input.charCodeAt(peg$currPos) === 126) {
1631
- s1 = peg$c22;
1718
+ s1 = peg$c27;
1632
1719
  peg$currPos++;
1633
1720
  } else {
1634
1721
  s1 = peg$FAILED;
1635
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1722
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1636
1723
  }
1637
1724
  if (s1 !== peg$FAILED) {
1638
1725
  peg$savedPos = s0;
1639
- s1 = peg$f23();
1726
+ s1 = peg$f21();
1640
1727
  }
1641
1728
  s0 = s1;
1642
1729
 
@@ -1652,14 +1739,14 @@ function peg$parse(input, options) {
1652
1739
  if (s1 !== peg$FAILED) {
1653
1740
  s2 = peg$currPos;
1654
1741
  if (input.charCodeAt(peg$currPos) === 58) {
1655
- s3 = peg$c23;
1742
+ s3 = peg$c6;
1656
1743
  peg$currPos++;
1657
1744
  } else {
1658
1745
  s3 = peg$FAILED;
1659
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
1746
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1660
1747
  }
1661
1748
  if (s3 !== peg$FAILED) {
1662
- s4 = peg$parsenumber();
1749
+ s4 = peg$parseintegerLiteral();
1663
1750
  if (s4 !== peg$FAILED) {
1664
1751
  s2 = s4;
1665
1752
  } else {
@@ -1673,18 +1760,12 @@ function peg$parse(input, options) {
1673
1760
  if (s2 === peg$FAILED) {
1674
1761
  s2 = null;
1675
1762
  }
1676
- if (input.charCodeAt(peg$currPos) === 47) {
1677
- s3 = peg$c24;
1678
- peg$currPos++;
1679
- } else {
1680
- s3 = peg$FAILED;
1681
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
1682
- }
1763
+ s3 = peg$parseslashFollows();
1683
1764
  if (s3 === peg$FAILED) {
1684
1765
  s3 = null;
1685
1766
  }
1686
1767
  peg$savedPos = s0;
1687
- s0 = peg$f24(s1, s2, s3);
1768
+ s0 = peg$f22(s1, s2, s3);
1688
1769
  } else {
1689
1770
  peg$currPos = s0;
1690
1771
  s0 = peg$FAILED;
@@ -1692,7 +1773,7 @@ function peg$parse(input, options) {
1692
1773
  peg$silentFails--;
1693
1774
  if (s0 === peg$FAILED) {
1694
1775
  s1 = peg$FAILED;
1695
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
1776
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
1696
1777
  }
1697
1778
 
1698
1779
  return s0;
@@ -1715,13 +1796,13 @@ function peg$parse(input, options) {
1715
1796
  }
1716
1797
  if (s1 !== peg$FAILED) {
1717
1798
  peg$savedPos = s0;
1718
- s1 = peg$f25(s1);
1799
+ s1 = peg$f23(s1);
1719
1800
  }
1720
1801
  s0 = s1;
1721
1802
  peg$silentFails--;
1722
1803
  if (s0 === peg$FAILED) {
1723
1804
  s1 = peg$FAILED;
1724
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
1805
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1725
1806
  }
1726
1807
 
1727
1808
  return s0;
@@ -1735,26 +1816,26 @@ function peg$parse(input, options) {
1735
1816
  peg$currPos++;
1736
1817
  } else {
1737
1818
  s0 = peg$FAILED;
1738
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
1819
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
1739
1820
  }
1740
1821
  if (s0 === peg$FAILED) {
1741
1822
  s0 = peg$currPos;
1742
1823
  if (input.charCodeAt(peg$currPos) === 45) {
1743
- s1 = peg$c25;
1824
+ s1 = peg$c28;
1744
1825
  peg$currPos++;
1745
1826
  } else {
1746
1827
  s1 = peg$FAILED;
1747
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
1828
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
1748
1829
  }
1749
1830
  if (s1 !== peg$FAILED) {
1750
1831
  s2 = peg$currPos;
1751
1832
  peg$silentFails++;
1752
1833
  if (input.charCodeAt(peg$currPos) === 62) {
1753
- s3 = peg$c26;
1834
+ s3 = peg$c29;
1754
1835
  peg$currPos++;
1755
1836
  } else {
1756
1837
  s3 = peg$FAILED;
1757
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
1838
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
1758
1839
  }
1759
1840
  peg$silentFails--;
1760
1841
  if (s3 === peg$FAILED) {
@@ -1816,7 +1897,7 @@ function peg$parse(input, options) {
1816
1897
  s2 = null;
1817
1898
  }
1818
1899
  peg$savedPos = s0;
1819
- s0 = peg$f26(s1);
1900
+ s0 = peg$f24(s1);
1820
1901
  } else {
1821
1902
  peg$currPos = s0;
1822
1903
  s0 = peg$FAILED;
@@ -1825,29 +1906,41 @@ function peg$parse(input, options) {
1825
1906
  return s0;
1826
1907
  }
1827
1908
 
1828
- function peg$parseimplicitParensArgs() {
1829
- var s0, s1, s2;
1909
+ function peg$parseimplicitParenthesesCallExpression() {
1910
+ var s0, s1, s2, s3, s4;
1830
1911
 
1831
1912
  peg$silentFails++;
1832
1913
  s0 = peg$currPos;
1833
- s1 = [];
1834
- s2 = peg$parseinlineSpace();
1835
- if (s2 !== peg$FAILED) {
1836
- while (s2 !== peg$FAILED) {
1837
- s1.push(s2);
1838
- s2 = peg$parseinlineSpace();
1839
- }
1840
- } else {
1841
- s1 = peg$FAILED;
1842
- }
1914
+ s1 = peg$parsearrowFunction();
1843
1915
  if (s1 !== peg$FAILED) {
1844
- s2 = peg$parselist();
1845
- if (s2 !== peg$FAILED) {
1846
- s0 = s2;
1916
+ s2 = peg$currPos;
1917
+ s3 = [];
1918
+ s4 = peg$parseinlineSpace();
1919
+ if (s4 !== peg$FAILED) {
1920
+ while (s4 !== peg$FAILED) {
1921
+ s3.push(s4);
1922
+ s4 = peg$parseinlineSpace();
1923
+ }
1847
1924
  } else {
1848
- peg$currPos = s0;
1849
- s0 = peg$FAILED;
1925
+ s3 = peg$FAILED;
1926
+ }
1927
+ if (s3 !== peg$FAILED) {
1928
+ s4 = peg$parseimplicitParensthesesArguments();
1929
+ if (s4 !== peg$FAILED) {
1930
+ s2 = s4;
1931
+ } else {
1932
+ peg$currPos = s2;
1933
+ s2 = peg$FAILED;
1934
+ }
1935
+ } else {
1936
+ peg$currPos = s2;
1937
+ s2 = peg$FAILED;
1938
+ }
1939
+ if (s2 === peg$FAILED) {
1940
+ s2 = null;
1850
1941
  }
1942
+ peg$savedPos = s0;
1943
+ s0 = peg$f25(s1, s2);
1851
1944
  } else {
1852
1945
  peg$currPos = s0;
1853
1946
  s0 = peg$FAILED;
@@ -1855,7 +1948,51 @@ function peg$parse(input, options) {
1855
1948
  peg$silentFails--;
1856
1949
  if (s0 === peg$FAILED) {
1857
1950
  s1 = peg$FAILED;
1858
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
1951
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
1952
+ }
1953
+
1954
+ return s0;
1955
+ }
1956
+
1957
+ function peg$parseimplicitParensthesesArguments() {
1958
+ var s0, s1, s2, s3, s4;
1959
+
1960
+ s0 = peg$currPos;
1961
+ s1 = peg$currPos;
1962
+ s2 = [];
1963
+ s3 = peg$parseshorthandFunction();
1964
+ while (s3 !== peg$FAILED) {
1965
+ s2.push(s3);
1966
+ s3 = peg$currPos;
1967
+ s4 = peg$parseseparator();
1968
+ if (s4 !== peg$FAILED) {
1969
+ s4 = peg$parseshorthandFunction();
1970
+ if (s4 === peg$FAILED) {
1971
+ peg$currPos = s3;
1972
+ s3 = peg$FAILED;
1973
+ } else {
1974
+ s3 = s4;
1975
+ }
1976
+ } else {
1977
+ s3 = s4;
1978
+ }
1979
+ }
1980
+ if (s2.length < 1) {
1981
+ peg$currPos = s1;
1982
+ s1 = peg$FAILED;
1983
+ } else {
1984
+ s1 = s2;
1985
+ }
1986
+ if (s1 !== peg$FAILED) {
1987
+ s2 = peg$parseseparator();
1988
+ if (s2 === peg$FAILED) {
1989
+ s2 = null;
1990
+ }
1991
+ peg$savedPos = s0;
1992
+ s0 = peg$f26(s1);
1993
+ } else {
1994
+ peg$currPos = s0;
1995
+ s0 = peg$FAILED;
1859
1996
  }
1860
1997
 
1861
1998
  return s0;
@@ -1869,13 +2006,13 @@ function peg$parse(input, options) {
1869
2006
  peg$currPos++;
1870
2007
  } else {
1871
2008
  s0 = peg$FAILED;
1872
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
2009
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
1873
2010
  }
1874
2011
 
1875
2012
  return s0;
1876
2013
  }
1877
2014
 
1878
- function peg$parseinteger() {
2015
+ function peg$parseintegerLiteral() {
1879
2016
  var s0, s1, s2;
1880
2017
 
1881
2018
  peg$silentFails++;
@@ -1895,34 +2032,49 @@ function peg$parse(input, options) {
1895
2032
  peg$silentFails--;
1896
2033
  if (s0 === peg$FAILED) {
1897
2034
  s1 = peg$FAILED;
1898
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
2035
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
1899
2036
  }
1900
2037
 
1901
2038
  return s0;
1902
2039
  }
1903
2040
 
1904
- function peg$parselambda() {
1905
- var s0, s1, s2, s3;
2041
+ function peg$parselist() {
2042
+ var s0, s1, s2, s3, s4;
1906
2043
 
1907
2044
  peg$silentFails++;
1908
2045
  s0 = peg$currPos;
1909
- if (input.charCodeAt(peg$currPos) === 61) {
1910
- s1 = peg$c27;
1911
- peg$currPos++;
1912
- } else {
1913
- s1 = peg$FAILED;
1914
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
1915
- }
1916
- if (s1 !== peg$FAILED) {
1917
- s2 = peg$parse__();
1918
- s3 = peg$parsepipeline();
1919
- if (s3 !== peg$FAILED) {
1920
- peg$savedPos = s0;
1921
- s0 = peg$f28(s3);
1922
- } else {
1923
- peg$currPos = s0;
1924
- s0 = peg$FAILED;
2046
+ s1 = peg$currPos;
2047
+ s2 = [];
2048
+ s3 = peg$parsepipelineExpression();
2049
+ while (s3 !== peg$FAILED) {
2050
+ s2.push(s3);
2051
+ s3 = peg$currPos;
2052
+ s4 = peg$parseseparator();
2053
+ if (s4 !== peg$FAILED) {
2054
+ s4 = peg$parsepipelineExpression();
2055
+ if (s4 === peg$FAILED) {
2056
+ peg$currPos = s3;
2057
+ s3 = peg$FAILED;
2058
+ } else {
2059
+ s3 = s4;
2060
+ }
2061
+ } else {
2062
+ s3 = s4;
1925
2063
  }
2064
+ }
2065
+ if (s2.length < 1) {
2066
+ peg$currPos = s1;
2067
+ s1 = peg$FAILED;
2068
+ } else {
2069
+ s1 = s2;
2070
+ }
2071
+ if (s1 !== peg$FAILED) {
2072
+ s2 = peg$parseseparator();
2073
+ if (s2 === peg$FAILED) {
2074
+ s2 = null;
2075
+ }
2076
+ peg$savedPos = s0;
2077
+ s0 = peg$f28(s1);
1926
2078
  } else {
1927
2079
  peg$currPos = s0;
1928
2080
  s0 = peg$FAILED;
@@ -1930,90 +2082,147 @@ function peg$parse(input, options) {
1930
2082
  peg$silentFails--;
1931
2083
  if (s0 === peg$FAILED) {
1932
2084
  s1 = peg$FAILED;
1933
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
2085
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
1934
2086
  }
1935
2087
 
1936
2088
  return s0;
1937
2089
  }
1938
2090
 
1939
- function peg$parseleadingSlashPath() {
1940
- var s0, s1, s2;
2091
+ function peg$parseliteral() {
2092
+ var s0;
1941
2093
 
1942
- peg$silentFails++;
1943
- s0 = peg$currPos;
1944
- if (input.charCodeAt(peg$currPos) === 47) {
1945
- s1 = peg$c24;
1946
- peg$currPos++;
1947
- } else {
1948
- s1 = peg$FAILED;
1949
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
2094
+ s0 = peg$parsenumericLiteral();
2095
+ if (s0 === peg$FAILED) {
2096
+ s0 = peg$parsestringLiteral();
1950
2097
  }
2098
+
2099
+ return s0;
2100
+ }
2101
+
2102
+ function peg$parselogicalAndExpression() {
2103
+ var s0, s1, s2, s3, s4, s5, s6, s7;
2104
+
2105
+ s0 = peg$currPos;
2106
+ s1 = peg$parseequalityExpression();
1951
2107
  if (s1 !== peg$FAILED) {
1952
- s2 = peg$parsepath();
1953
- if (s2 === peg$FAILED) {
1954
- s2 = null;
2108
+ s2 = [];
2109
+ s3 = peg$currPos;
2110
+ s4 = peg$parse__();
2111
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2112
+ s5 = peg$c30;
2113
+ peg$currPos += 2;
2114
+ } else {
2115
+ s5 = peg$FAILED;
2116
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
2117
+ }
2118
+ if (s5 !== peg$FAILED) {
2119
+ s6 = peg$parse__();
2120
+ s7 = peg$parseequalityExpression();
2121
+ if (s7 !== peg$FAILED) {
2122
+ s3 = s7;
2123
+ } else {
2124
+ peg$currPos = s3;
2125
+ s3 = peg$FAILED;
2126
+ }
2127
+ } else {
2128
+ peg$currPos = s3;
2129
+ s3 = peg$FAILED;
2130
+ }
2131
+ while (s3 !== peg$FAILED) {
2132
+ s2.push(s3);
2133
+ s3 = peg$currPos;
2134
+ s4 = peg$parse__();
2135
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2136
+ s5 = peg$c30;
2137
+ peg$currPos += 2;
2138
+ } else {
2139
+ s5 = peg$FAILED;
2140
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
2141
+ }
2142
+ if (s5 !== peg$FAILED) {
2143
+ s6 = peg$parse__();
2144
+ s7 = peg$parseequalityExpression();
2145
+ if (s7 !== peg$FAILED) {
2146
+ s3 = s7;
2147
+ } else {
2148
+ peg$currPos = s3;
2149
+ s3 = peg$FAILED;
2150
+ }
2151
+ } else {
2152
+ peg$currPos = s3;
2153
+ s3 = peg$FAILED;
2154
+ }
1955
2155
  }
1956
2156
  peg$savedPos = s0;
1957
- s0 = peg$f29(s2);
2157
+ s0 = peg$f29(s1, s2);
1958
2158
  } else {
1959
2159
  peg$currPos = s0;
1960
2160
  s0 = peg$FAILED;
1961
2161
  }
1962
- peg$silentFails--;
1963
- if (s0 === peg$FAILED) {
1964
- s1 = peg$FAILED;
1965
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
1966
- }
1967
2162
 
1968
2163
  return s0;
1969
2164
  }
1970
2165
 
1971
- function peg$parselist() {
1972
- var s0, s1, s2, s3, s4;
2166
+ function peg$parselogicalOrExpression() {
2167
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1973
2168
 
1974
- peg$silentFails++;
1975
2169
  s0 = peg$currPos;
1976
- s1 = peg$currPos;
1977
- s2 = [];
1978
- s3 = peg$parsevalue();
1979
- while (s3 !== peg$FAILED) {
1980
- s2.push(s3);
2170
+ s1 = peg$parsenullishCoalescingExpression();
2171
+ if (s1 !== peg$FAILED) {
2172
+ s2 = [];
1981
2173
  s3 = peg$currPos;
1982
- s4 = peg$parseseparator();
1983
- if (s4 !== peg$FAILED) {
1984
- s4 = peg$parsevalue();
1985
- if (s4 === peg$FAILED) {
2174
+ s4 = peg$parse__();
2175
+ if (input.substr(peg$currPos, 2) === peg$c31) {
2176
+ s5 = peg$c31;
2177
+ peg$currPos += 2;
2178
+ } else {
2179
+ s5 = peg$FAILED;
2180
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
2181
+ }
2182
+ if (s5 !== peg$FAILED) {
2183
+ s6 = peg$parse__();
2184
+ s7 = peg$parsenullishCoalescingExpression();
2185
+ if (s7 !== peg$FAILED) {
2186
+ s3 = s7;
2187
+ } else {
1986
2188
  peg$currPos = s3;
1987
2189
  s3 = peg$FAILED;
1988
- } else {
1989
- s3 = s4;
1990
2190
  }
1991
2191
  } else {
1992
- s3 = s4;
2192
+ peg$currPos = s3;
2193
+ s3 = peg$FAILED;
1993
2194
  }
1994
- }
1995
- if (s2.length < 1) {
1996
- peg$currPos = s1;
1997
- s1 = peg$FAILED;
1998
- } else {
1999
- s1 = s2;
2000
- }
2001
- if (s1 !== peg$FAILED) {
2002
- s2 = peg$parseseparator();
2003
- if (s2 === peg$FAILED) {
2004
- s2 = null;
2195
+ while (s3 !== peg$FAILED) {
2196
+ s2.push(s3);
2197
+ s3 = peg$currPos;
2198
+ s4 = peg$parse__();
2199
+ if (input.substr(peg$currPos, 2) === peg$c31) {
2200
+ s5 = peg$c31;
2201
+ peg$currPos += 2;
2202
+ } else {
2203
+ s5 = peg$FAILED;
2204
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
2205
+ }
2206
+ if (s5 !== peg$FAILED) {
2207
+ s6 = peg$parse__();
2208
+ s7 = peg$parsenullishCoalescingExpression();
2209
+ if (s7 !== peg$FAILED) {
2210
+ s3 = s7;
2211
+ } else {
2212
+ peg$currPos = s3;
2213
+ s3 = peg$FAILED;
2214
+ }
2215
+ } else {
2216
+ peg$currPos = s3;
2217
+ s3 = peg$FAILED;
2218
+ }
2005
2219
  }
2006
2220
  peg$savedPos = s0;
2007
- s0 = peg$f30(s1);
2221
+ s0 = peg$f30(s1, s2);
2008
2222
  } else {
2009
2223
  peg$currPos = s0;
2010
2224
  s0 = peg$FAILED;
2011
2225
  }
2012
- peg$silentFails--;
2013
- if (s0 === peg$FAILED) {
2014
- s1 = peg$FAILED;
2015
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
2016
- }
2017
2226
 
2018
2227
  return s0;
2019
2228
  }
@@ -2022,8 +2231,8 @@ function peg$parse(input, options) {
2022
2231
  var s0, s1, s2, s3, s4, s5;
2023
2232
 
2024
2233
  s0 = peg$currPos;
2025
- if (input.substr(peg$currPos, 2) === peg$c28) {
2026
- s1 = peg$c28;
2234
+ if (input.substr(peg$currPos, 2) === peg$c32) {
2235
+ s1 = peg$c32;
2027
2236
  peg$currPos += 2;
2028
2237
  } else {
2029
2238
  s1 = peg$FAILED;
@@ -2034,8 +2243,8 @@ function peg$parse(input, options) {
2034
2243
  s3 = peg$currPos;
2035
2244
  s4 = peg$currPos;
2036
2245
  peg$silentFails++;
2037
- if (input.substr(peg$currPos, 2) === peg$c29) {
2038
- s5 = peg$c29;
2246
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2247
+ s5 = peg$c33;
2039
2248
  peg$currPos += 2;
2040
2249
  } else {
2041
2250
  s5 = peg$FAILED;
@@ -2072,8 +2281,8 @@ function peg$parse(input, options) {
2072
2281
  s3 = peg$currPos;
2073
2282
  s4 = peg$currPos;
2074
2283
  peg$silentFails++;
2075
- if (input.substr(peg$currPos, 2) === peg$c29) {
2076
- s5 = peg$c29;
2284
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2285
+ s5 = peg$c33;
2077
2286
  peg$currPos += 2;
2078
2287
  } else {
2079
2288
  s5 = peg$FAILED;
@@ -2106,8 +2315,8 @@ function peg$parse(input, options) {
2106
2315
  s3 = peg$FAILED;
2107
2316
  }
2108
2317
  }
2109
- if (input.substr(peg$currPos, 2) === peg$c29) {
2110
- s3 = peg$c29;
2318
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2319
+ s3 = peg$c33;
2111
2320
  peg$currPos += 2;
2112
2321
  } else {
2113
2322
  s3 = peg$FAILED;
@@ -2133,7 +2342,7 @@ function peg$parse(input, options) {
2133
2342
 
2134
2343
  s0 = peg$currPos;
2135
2344
  if (input.charCodeAt(peg$currPos) === 64) {
2136
- s1 = peg$c30;
2345
+ s1 = peg$c34;
2137
2346
  peg$currPos++;
2138
2347
  } else {
2139
2348
  s1 = peg$FAILED;
@@ -2166,11 +2375,11 @@ function peg$parse(input, options) {
2166
2375
  }
2167
2376
  if (s2 !== peg$FAILED) {
2168
2377
  if (input.charCodeAt(peg$currPos) === 58) {
2169
- s3 = peg$c23;
2378
+ s3 = peg$c6;
2170
2379
  peg$currPos++;
2171
2380
  } else {
2172
2381
  s3 = peg$FAILED;
2173
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
2382
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
2174
2383
  }
2175
2384
  if (s3 !== peg$FAILED) {
2176
2385
  peg$savedPos = s0;
@@ -2187,58 +2396,19 @@ function peg$parse(input, options) {
2187
2396
  return s0;
2188
2397
  }
2189
2398
 
2190
- function peg$parsenamespacePath() {
2191
- var s0, s1, s2;
2192
-
2193
- s0 = peg$currPos;
2194
- s1 = peg$parsenamespace();
2195
- if (s1 !== peg$FAILED) {
2196
- s2 = peg$parsedoubleSlashPath();
2197
- if (s2 !== peg$FAILED) {
2198
- peg$savedPos = s0;
2199
- s0 = peg$f33(s1, s2);
2200
- } else {
2201
- peg$currPos = s0;
2202
- s0 = peg$FAILED;
2203
- }
2204
- } else {
2205
- peg$currPos = s0;
2206
- s0 = peg$FAILED;
2207
- }
2208
- if (s0 === peg$FAILED) {
2209
- s0 = peg$currPos;
2210
- s1 = peg$parsenamespace();
2211
- if (s1 !== peg$FAILED) {
2212
- s2 = peg$parsepath();
2213
- if (s2 !== peg$FAILED) {
2214
- peg$savedPos = s0;
2215
- s0 = peg$f34(s1, s2);
2216
- } else {
2217
- peg$currPos = s0;
2218
- s0 = peg$FAILED;
2219
- }
2220
- } else {
2221
- peg$currPos = s0;
2222
- s0 = peg$FAILED;
2223
- }
2224
- }
2225
-
2226
- return s0;
2227
- }
2228
-
2229
2399
  function peg$parsenewLine() {
2230
2400
  var s0;
2231
2401
 
2232
2402
  if (input.charCodeAt(peg$currPos) === 10) {
2233
- s0 = peg$c31;
2403
+ s0 = peg$c35;
2234
2404
  peg$currPos++;
2235
2405
  } else {
2236
2406
  s0 = peg$FAILED;
2237
2407
  if (peg$silentFails === 0) { peg$fail(peg$e54); }
2238
2408
  }
2239
2409
  if (s0 === peg$FAILED) {
2240
- if (input.substr(peg$currPos, 2) === peg$c32) {
2241
- s0 = peg$c32;
2410
+ if (input.substr(peg$currPos, 2) === peg$c36) {
2411
+ s0 = peg$c36;
2242
2412
  peg$currPos += 2;
2243
2413
  } else {
2244
2414
  s0 = peg$FAILED;
@@ -2246,7 +2416,7 @@ function peg$parse(input, options) {
2246
2416
  }
2247
2417
  if (s0 === peg$FAILED) {
2248
2418
  if (input.charCodeAt(peg$currPos) === 13) {
2249
- s0 = peg$c33;
2419
+ s0 = peg$c37;
2250
2420
  peg$currPos++;
2251
2421
  } else {
2252
2422
  s0 = peg$FAILED;
@@ -2258,13 +2428,13 @@ function peg$parse(input, options) {
2258
2428
  return s0;
2259
2429
  }
2260
2430
 
2261
- function peg$parsenumber() {
2431
+ function peg$parsenumericLiteral() {
2262
2432
  var s0, s1;
2263
2433
 
2264
2434
  peg$silentFails++;
2265
- s0 = peg$parsefloat();
2435
+ s0 = peg$parsefloatLiteral();
2266
2436
  if (s0 === peg$FAILED) {
2267
- s0 = peg$parseinteger();
2437
+ s0 = peg$parseintegerLiteral();
2268
2438
  }
2269
2439
  peg$silentFails--;
2270
2440
  if (s0 === peg$FAILED) {
@@ -2275,17 +2445,81 @@ function peg$parse(input, options) {
2275
2445
  return s0;
2276
2446
  }
2277
2447
 
2278
- function peg$parseobject() {
2448
+ function peg$parsenullishCoalescingExpression() {
2449
+ var s0, s1, s2, s3, s4, s5, s6, s7;
2450
+
2451
+ s0 = peg$currPos;
2452
+ s1 = peg$parselogicalAndExpression();
2453
+ if (s1 !== peg$FAILED) {
2454
+ s2 = [];
2455
+ s3 = peg$currPos;
2456
+ s4 = peg$parse__();
2457
+ if (input.substr(peg$currPos, 2) === peg$c38) {
2458
+ s5 = peg$c38;
2459
+ peg$currPos += 2;
2460
+ } else {
2461
+ s5 = peg$FAILED;
2462
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
2463
+ }
2464
+ if (s5 !== peg$FAILED) {
2465
+ s6 = peg$parse__();
2466
+ s7 = peg$parselogicalAndExpression();
2467
+ if (s7 !== peg$FAILED) {
2468
+ s3 = s7;
2469
+ } else {
2470
+ peg$currPos = s3;
2471
+ s3 = peg$FAILED;
2472
+ }
2473
+ } else {
2474
+ peg$currPos = s3;
2475
+ s3 = peg$FAILED;
2476
+ }
2477
+ while (s3 !== peg$FAILED) {
2478
+ s2.push(s3);
2479
+ s3 = peg$currPos;
2480
+ s4 = peg$parse__();
2481
+ if (input.substr(peg$currPos, 2) === peg$c38) {
2482
+ s5 = peg$c38;
2483
+ peg$currPos += 2;
2484
+ } else {
2485
+ s5 = peg$FAILED;
2486
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
2487
+ }
2488
+ if (s5 !== peg$FAILED) {
2489
+ s6 = peg$parse__();
2490
+ s7 = peg$parselogicalAndExpression();
2491
+ if (s7 !== peg$FAILED) {
2492
+ s3 = s7;
2493
+ } else {
2494
+ peg$currPos = s3;
2495
+ s3 = peg$FAILED;
2496
+ }
2497
+ } else {
2498
+ peg$currPos = s3;
2499
+ s3 = peg$FAILED;
2500
+ }
2501
+ }
2502
+ peg$savedPos = s0;
2503
+ s0 = peg$f33(s1, s2);
2504
+ } else {
2505
+ peg$currPos = s0;
2506
+ s0 = peg$FAILED;
2507
+ }
2508
+
2509
+ return s0;
2510
+ }
2511
+
2512
+ function peg$parseobjectLiteral() {
2279
2513
  var s0, s1, s2, s3, s4, s5;
2280
2514
 
2281
2515
  peg$silentFails++;
2282
2516
  s0 = peg$currPos;
2283
2517
  if (input.charCodeAt(peg$currPos) === 123) {
2284
- s1 = peg$c34;
2518
+ s1 = peg$c39;
2285
2519
  peg$currPos++;
2286
2520
  } else {
2287
2521
  s1 = peg$FAILED;
2288
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
2522
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
2289
2523
  }
2290
2524
  if (s1 !== peg$FAILED) {
2291
2525
  s2 = peg$parse__();
@@ -2297,7 +2531,7 @@ function peg$parse(input, options) {
2297
2531
  s5 = peg$parseclosingBrace();
2298
2532
  if (s5 !== peg$FAILED) {
2299
2533
  peg$savedPos = s0;
2300
- s0 = peg$f35(s3);
2534
+ s0 = peg$f34(s3);
2301
2535
  } else {
2302
2536
  peg$currPos = s0;
2303
2537
  s0 = peg$FAILED;
@@ -2309,7 +2543,7 @@ function peg$parse(input, options) {
2309
2543
  peg$silentFails--;
2310
2544
  if (s0 === peg$FAILED) {
2311
2545
  s1 = peg$FAILED;
2312
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
2546
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
2313
2547
  }
2314
2548
 
2315
2549
  return s0;
@@ -2350,7 +2584,7 @@ function peg$parse(input, options) {
2350
2584
  s2 = null;
2351
2585
  }
2352
2586
  peg$savedPos = s0;
2353
- s0 = peg$f36(s1);
2587
+ s0 = peg$f35(s1);
2354
2588
  } else {
2355
2589
  peg$currPos = s0;
2356
2590
  s0 = peg$FAILED;
@@ -2385,18 +2619,18 @@ function peg$parse(input, options) {
2385
2619
  if (s1 !== peg$FAILED) {
2386
2620
  s2 = peg$parse__();
2387
2621
  if (input.charCodeAt(peg$currPos) === 61) {
2388
- s3 = peg$c27;
2622
+ s3 = peg$c40;
2389
2623
  peg$currPos++;
2390
2624
  } else {
2391
2625
  s3 = peg$FAILED;
2392
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
2626
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
2393
2627
  }
2394
2628
  if (s3 !== peg$FAILED) {
2395
2629
  s4 = peg$parse__();
2396
- s5 = peg$parsepipeline();
2630
+ s5 = peg$parsepipelineExpression();
2397
2631
  if (s5 !== peg$FAILED) {
2398
2632
  peg$savedPos = s0;
2399
- s0 = peg$f37(s1, s5);
2633
+ s0 = peg$f36(s1, s5);
2400
2634
  } else {
2401
2635
  peg$currPos = s0;
2402
2636
  s0 = peg$FAILED;
@@ -2412,7 +2646,7 @@ function peg$parse(input, options) {
2412
2646
  peg$silentFails--;
2413
2647
  if (s0 === peg$FAILED) {
2414
2648
  s1 = peg$FAILED;
2415
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2649
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
2416
2650
  }
2417
2651
 
2418
2652
  return s0;
@@ -2424,21 +2658,21 @@ function peg$parse(input, options) {
2424
2658
  s0 = peg$currPos;
2425
2659
  s1 = peg$currPos;
2426
2660
  if (input.charCodeAt(peg$currPos) === 40) {
2427
- s2 = peg$c19;
2661
+ s2 = peg$c1;
2428
2662
  peg$currPos++;
2429
2663
  } else {
2430
2664
  s2 = peg$FAILED;
2431
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2665
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
2432
2666
  }
2433
2667
  if (s2 !== peg$FAILED) {
2434
2668
  s3 = peg$parseobjectPublicKey();
2435
2669
  if (s3 !== peg$FAILED) {
2436
2670
  if (input.charCodeAt(peg$currPos) === 41) {
2437
- s4 = peg$c4;
2671
+ s4 = peg$c2;
2438
2672
  peg$currPos++;
2439
2673
  } else {
2440
2674
  s4 = peg$FAILED;
2441
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
2675
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
2442
2676
  }
2443
2677
  if (s4 !== peg$FAILED) {
2444
2678
  s2 = [s2, s3, s4];
@@ -2457,7 +2691,7 @@ function peg$parse(input, options) {
2457
2691
  }
2458
2692
  if (s1 !== peg$FAILED) {
2459
2693
  peg$savedPos = s0;
2460
- s1 = peg$f38(s1);
2694
+ s1 = peg$f37(s1);
2461
2695
  }
2462
2696
  s0 = s1;
2463
2697
 
@@ -2475,7 +2709,7 @@ function peg$parse(input, options) {
2475
2709
  peg$silentFails--;
2476
2710
  if (s0 === peg$FAILED) {
2477
2711
  s1 = peg$FAILED;
2478
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
2712
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
2479
2713
  }
2480
2714
 
2481
2715
  return s0;
@@ -2490,18 +2724,18 @@ function peg$parse(input, options) {
2490
2724
  if (s1 !== peg$FAILED) {
2491
2725
  s2 = peg$parse__();
2492
2726
  if (input.charCodeAt(peg$currPos) === 58) {
2493
- s3 = peg$c23;
2727
+ s3 = peg$c6;
2494
2728
  peg$currPos++;
2495
2729
  } else {
2496
2730
  s3 = peg$FAILED;
2497
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
2731
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
2498
2732
  }
2499
2733
  if (s3 !== peg$FAILED) {
2500
2734
  s4 = peg$parse__();
2501
- s5 = peg$parsepipeline();
2735
+ s5 = peg$parsepipelineExpression();
2502
2736
  if (s5 !== peg$FAILED) {
2503
2737
  peg$savedPos = s0;
2504
- s0 = peg$f39(s1, s5);
2738
+ s0 = peg$f38(s1, s5);
2505
2739
  } else {
2506
2740
  peg$currPos = s0;
2507
2741
  s0 = peg$FAILED;
@@ -2517,7 +2751,7 @@ function peg$parse(input, options) {
2517
2751
  peg$silentFails--;
2518
2752
  if (s0 === peg$FAILED) {
2519
2753
  s1 = peg$FAILED;
2520
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2754
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
2521
2755
  }
2522
2756
 
2523
2757
  return s0;
@@ -2531,13 +2765,13 @@ function peg$parse(input, options) {
2531
2765
  s1 = peg$parseobjectPublicKey();
2532
2766
  if (s1 !== peg$FAILED) {
2533
2767
  peg$savedPos = s0;
2534
- s1 = peg$f40(s1);
2768
+ s1 = peg$f39(s1);
2535
2769
  }
2536
2770
  s0 = s1;
2537
2771
  peg$silentFails--;
2538
2772
  if (s0 === peg$FAILED) {
2539
2773
  s1 = peg$FAILED;
2540
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2774
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2541
2775
  }
2542
2776
 
2543
2777
  return s0;
@@ -2550,27 +2784,27 @@ function peg$parse(input, options) {
2550
2784
  s1 = peg$parseidentifier();
2551
2785
  if (s1 !== peg$FAILED) {
2552
2786
  if (input.charCodeAt(peg$currPos) === 47) {
2553
- s2 = peg$c24;
2787
+ s2 = peg$c41;
2554
2788
  peg$currPos++;
2555
2789
  } else {
2556
2790
  s2 = peg$FAILED;
2557
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
2791
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2558
2792
  }
2559
2793
  if (s2 === peg$FAILED) {
2560
2794
  s2 = null;
2561
2795
  }
2562
2796
  peg$savedPos = s0;
2563
- s0 = peg$f41(s1, s2);
2797
+ s0 = peg$f40(s1, s2);
2564
2798
  } else {
2565
2799
  peg$currPos = s0;
2566
2800
  s0 = peg$FAILED;
2567
2801
  }
2568
2802
  if (s0 === peg$FAILED) {
2569
2803
  s0 = peg$currPos;
2570
- s1 = peg$parsestring();
2804
+ s1 = peg$parsestringLiteral();
2571
2805
  if (s1 !== peg$FAILED) {
2572
2806
  peg$savedPos = s0;
2573
- s1 = peg$f42(s1);
2807
+ s1 = peg$f41(s1);
2574
2808
  }
2575
2809
  s0 = s1;
2576
2810
  }
@@ -2578,48 +2812,35 @@ function peg$parse(input, options) {
2578
2812
  return s0;
2579
2813
  }
2580
2814
 
2581
- function peg$parseparameterizedLambda() {
2582
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
2815
+ function peg$parseparenthesesArguments() {
2816
+ var s0, s1, s2, s3, s4, s5;
2583
2817
 
2818
+ peg$silentFails++;
2584
2819
  s0 = peg$currPos;
2585
2820
  if (input.charCodeAt(peg$currPos) === 40) {
2586
- s1 = peg$c19;
2821
+ s1 = peg$c1;
2587
2822
  peg$currPos++;
2588
2823
  } else {
2589
2824
  s1 = peg$FAILED;
2590
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2825
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
2591
2826
  }
2592
2827
  if (s1 !== peg$FAILED) {
2593
2828
  s2 = peg$parse__();
2594
- s3 = peg$parseidentifierList();
2829
+ s3 = peg$parselist();
2595
2830
  if (s3 === peg$FAILED) {
2596
2831
  s3 = null;
2597
2832
  }
2598
2833
  s4 = peg$parse__();
2599
2834
  if (input.charCodeAt(peg$currPos) === 41) {
2600
- s5 = peg$c4;
2835
+ s5 = peg$c2;
2601
2836
  peg$currPos++;
2602
2837
  } else {
2603
2838
  s5 = peg$FAILED;
2604
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
2839
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
2605
2840
  }
2606
2841
  if (s5 !== peg$FAILED) {
2607
- s6 = peg$parse__();
2608
- s7 = peg$parsedoubleArrow();
2609
- if (s7 !== peg$FAILED) {
2610
- s8 = peg$parse__();
2611
- s9 = peg$parsepipeline();
2612
- if (s9 !== peg$FAILED) {
2613
- peg$savedPos = s0;
2614
- s0 = peg$f43(s3, s9);
2615
- } else {
2616
- peg$currPos = s0;
2617
- s0 = peg$FAILED;
2618
- }
2619
- } else {
2620
- peg$currPos = s0;
2621
- s0 = peg$FAILED;
2622
- }
2842
+ peg$savedPos = s0;
2843
+ s0 = peg$f42(s3);
2623
2844
  } else {
2624
2845
  peg$currPos = s0;
2625
2846
  s0 = peg$FAILED;
@@ -2628,131 +2849,107 @@ function peg$parse(input, options) {
2628
2849
  peg$currPos = s0;
2629
2850
  s0 = peg$FAILED;
2630
2851
  }
2852
+ peg$silentFails--;
2853
+ if (s0 === peg$FAILED) {
2854
+ s1 = peg$FAILED;
2855
+ if (peg$silentFails === 0) { peg$fail(peg$e67); }
2856
+ }
2631
2857
 
2632
2858
  return s0;
2633
2859
  }
2634
2860
 
2635
- function peg$parseparensArgs() {
2636
- var s0, s1, s2, s3, s4, s5;
2861
+ function peg$parsepath() {
2862
+ var s0, s1, s2, s3;
2637
2863
 
2638
2864
  peg$silentFails++;
2639
2865
  s0 = peg$currPos;
2640
- if (input.charCodeAt(peg$currPos) === 40) {
2641
- s1 = peg$c19;
2642
- peg$currPos++;
2643
- } else {
2866
+ s1 = peg$currPos;
2867
+ s2 = [];
2868
+ s3 = peg$parsepathSegment();
2869
+ while (s3 !== peg$FAILED) {
2870
+ s2.push(s3);
2871
+ s3 = peg$parsepathSegment();
2872
+ }
2873
+ if (s2.length < 1) {
2874
+ peg$currPos = s1;
2644
2875
  s1 = peg$FAILED;
2645
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2876
+ } else {
2877
+ s1 = s2;
2646
2878
  }
2647
2879
  if (s1 !== peg$FAILED) {
2648
- s2 = peg$parse__();
2649
- s3 = peg$parselist();
2650
- if (s3 === peg$FAILED) {
2651
- s3 = null;
2652
- }
2653
- s4 = peg$parse__();
2654
- if (input.charCodeAt(peg$currPos) === 41) {
2655
- s5 = peg$c4;
2656
- peg$currPos++;
2657
- } else {
2658
- s5 = peg$FAILED;
2659
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
2660
- }
2661
- if (s5 !== peg$FAILED) {
2662
- peg$savedPos = s0;
2663
- s0 = peg$f44(s3);
2664
- } else {
2665
- peg$currPos = s0;
2666
- s0 = peg$FAILED;
2667
- }
2668
- } else {
2669
- peg$currPos = s0;
2670
- s0 = peg$FAILED;
2880
+ peg$savedPos = s0;
2881
+ s1 = peg$f43(s1);
2671
2882
  }
2883
+ s0 = s1;
2672
2884
  peg$silentFails--;
2673
2885
  if (s0 === peg$FAILED) {
2674
2886
  s1 = peg$FAILED;
2675
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2887
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2676
2888
  }
2677
2889
 
2678
2890
  return s0;
2679
2891
  }
2680
2892
 
2681
- function peg$parsepath() {
2682
- var s0, s1, s2, s3;
2893
+ function peg$parsepathArguments() {
2894
+ var s0, s1;
2683
2895
 
2684
- peg$silentFails++;
2685
2896
  s0 = peg$currPos;
2686
- s1 = [];
2687
- s2 = peg$parsepathElement();
2688
- while (s2 !== peg$FAILED) {
2689
- s1.push(s2);
2690
- s2 = peg$parsepathElement();
2897
+ s1 = peg$parsepath();
2898
+ if (s1 !== peg$FAILED) {
2899
+ peg$savedPos = s0;
2900
+ s1 = peg$f44(s1);
2691
2901
  }
2692
- s2 = peg$parsepathTail();
2902
+ s0 = s1;
2903
+
2904
+ return s0;
2905
+ }
2906
+
2907
+ function peg$parsepathKey() {
2908
+ var s0, s1, s2;
2909
+
2910
+ s0 = peg$currPos;
2911
+ s1 = [];
2912
+ s2 = peg$parsepathSegmentChar();
2693
2913
  if (s2 !== peg$FAILED) {
2914
+ while (s2 !== peg$FAILED) {
2915
+ s1.push(s2);
2916
+ s2 = peg$parsepathSegmentChar();
2917
+ }
2918
+ } else {
2919
+ s1 = peg$FAILED;
2920
+ }
2921
+ if (s1 !== peg$FAILED) {
2922
+ s2 = peg$parseslashFollows();
2923
+ if (s2 === peg$FAILED) {
2924
+ s2 = null;
2925
+ }
2694
2926
  peg$savedPos = s0;
2695
2927
  s0 = peg$f45(s1, s2);
2696
2928
  } else {
2697
2929
  peg$currPos = s0;
2698
2930
  s0 = peg$FAILED;
2699
2931
  }
2700
- if (s0 === peg$FAILED) {
2701
- s0 = peg$currPos;
2702
- s1 = peg$currPos;
2703
- s2 = [];
2704
- s3 = peg$parsepathElement();
2705
- while (s3 !== peg$FAILED) {
2706
- s2.push(s3);
2707
- s3 = peg$parsepathElement();
2708
- }
2709
- if (s2.length < 1) {
2710
- peg$currPos = s1;
2711
- s1 = peg$FAILED;
2712
- } else {
2713
- s1 = s2;
2714
- }
2715
- if (s1 !== peg$FAILED) {
2716
- s2 = peg$parsepathTail();
2717
- if (s2 === peg$FAILED) {
2718
- s2 = null;
2719
- }
2720
- peg$savedPos = s0;
2721
- s0 = peg$f46(s1, s2);
2722
- } else {
2723
- peg$currPos = s0;
2724
- s0 = peg$FAILED;
2725
- }
2726
- }
2727
- peg$silentFails--;
2728
- if (s0 === peg$FAILED) {
2729
- s1 = peg$FAILED;
2730
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2731
- }
2732
2932
 
2733
2933
  return s0;
2734
2934
  }
2735
2935
 
2736
- function peg$parsepathElement() {
2936
+ function peg$parsepathSegment() {
2737
2937
  var s0, s1, s2;
2738
2938
 
2739
2939
  s0 = peg$currPos;
2740
- s1 = [];
2741
- s2 = peg$parsepathKeyChar();
2742
- while (s2 !== peg$FAILED) {
2743
- s1.push(s2);
2744
- s2 = peg$parsepathKeyChar();
2745
- }
2746
2940
  if (input.charCodeAt(peg$currPos) === 47) {
2747
- s2 = peg$c24;
2941
+ s1 = peg$c41;
2748
2942
  peg$currPos++;
2749
2943
  } else {
2750
- s2 = peg$FAILED;
2751
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
2944
+ s1 = peg$FAILED;
2945
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2752
2946
  }
2753
- if (s2 !== peg$FAILED) {
2754
- peg$savedPos = s0;
2755
- s0 = peg$f47(s1);
2947
+ if (s1 !== peg$FAILED) {
2948
+ s2 = peg$parsepathKey();
2949
+ if (s2 === peg$FAILED) {
2950
+ s2 = null;
2951
+ }
2952
+ s0 = s2;
2756
2953
  } else {
2757
2954
  peg$currPos = s0;
2758
2955
  s0 = peg$FAILED;
@@ -2761,7 +2958,7 @@ function peg$parse(input, options) {
2761
2958
  return s0;
2762
2959
  }
2763
2960
 
2764
- function peg$parsepathKeyChar() {
2961
+ function peg$parsepathSegmentChar() {
2765
2962
  var s0;
2766
2963
 
2767
2964
  s0 = input.charAt(peg$currPos);
@@ -2769,7 +2966,7 @@ function peg$parse(input, options) {
2769
2966
  peg$currPos++;
2770
2967
  } else {
2771
2968
  s0 = peg$FAILED;
2772
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2969
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
2773
2970
  }
2774
2971
  if (s0 === peg$FAILED) {
2775
2972
  s0 = peg$parseescapedChar();
@@ -2778,34 +2975,11 @@ function peg$parse(input, options) {
2778
2975
  return s0;
2779
2976
  }
2780
2977
 
2781
- function peg$parsepathTail() {
2782
- var s0, s1, s2;
2783
-
2784
- s0 = peg$currPos;
2785
- s1 = [];
2786
- s2 = peg$parsepathKeyChar();
2787
- if (s2 !== peg$FAILED) {
2788
- while (s2 !== peg$FAILED) {
2789
- s1.push(s2);
2790
- s2 = peg$parsepathKeyChar();
2791
- }
2792
- } else {
2793
- s1 = peg$FAILED;
2794
- }
2795
- if (s1 !== peg$FAILED) {
2796
- peg$savedPos = s0;
2797
- s1 = peg$f48(s1);
2798
- }
2799
- s0 = s1;
2800
-
2801
- return s0;
2802
- }
2803
-
2804
- function peg$parsepipeline() {
2978
+ function peg$parsepipelineExpression() {
2805
2979
  var s0, s1, s2, s3, s4, s5, s6, s7;
2806
2980
 
2807
2981
  s0 = peg$currPos;
2808
- s1 = peg$parsevalue();
2982
+ s1 = peg$parseshorthandFunction();
2809
2983
  if (s1 !== peg$FAILED) {
2810
2984
  s2 = [];
2811
2985
  s3 = peg$currPos;
@@ -2813,7 +2987,7 @@ function peg$parse(input, options) {
2813
2987
  s5 = peg$parsesingleArrow();
2814
2988
  if (s5 !== peg$FAILED) {
2815
2989
  s6 = peg$parse__();
2816
- s7 = peg$parsepipelineStep();
2990
+ s7 = peg$parseshorthandFunction();
2817
2991
  if (s7 !== peg$FAILED) {
2818
2992
  s3 = s7;
2819
2993
  } else {
@@ -2831,7 +3005,7 @@ function peg$parse(input, options) {
2831
3005
  s5 = peg$parsesingleArrow();
2832
3006
  if (s5 !== peg$FAILED) {
2833
3007
  s6 = peg$parse__();
2834
- s7 = peg$parsepipelineStep();
3008
+ s7 = peg$parseshorthandFunction();
2835
3009
  if (s7 !== peg$FAILED) {
2836
3010
  s3 = s7;
2837
3011
  } else {
@@ -2844,7 +3018,7 @@ function peg$parse(input, options) {
2844
3018
  }
2845
3019
  }
2846
3020
  peg$savedPos = s0;
2847
- s0 = peg$f49(s1, s2);
3021
+ s0 = peg$f46(s1, s2);
2848
3022
  } else {
2849
3023
  peg$currPos = s0;
2850
3024
  s0 = peg$FAILED;
@@ -2853,14 +3027,23 @@ function peg$parse(input, options) {
2853
3027
  return s0;
2854
3028
  }
2855
3029
 
2856
- function peg$parsepipelineStep() {
3030
+ function peg$parseprimary() {
2857
3031
  var s0;
2858
3032
 
2859
- s0 = peg$parselambda();
3033
+ s0 = peg$parseliteral();
2860
3034
  if (s0 === peg$FAILED) {
2861
- s0 = peg$parseparameterizedLambda();
3035
+ s0 = peg$parsearrayLiteral();
2862
3036
  if (s0 === peg$FAILED) {
2863
- s0 = peg$parsecallTarget();
3037
+ s0 = peg$parseobjectLiteral();
3038
+ if (s0 === peg$FAILED) {
3039
+ s0 = peg$parsegroup();
3040
+ if (s0 === peg$FAILED) {
3041
+ s0 = peg$parsetemplateLiteral();
3042
+ if (s0 === peg$FAILED) {
3043
+ s0 = peg$parsereference();
3044
+ }
3045
+ }
3046
+ }
2864
3047
  }
2865
3048
  }
2866
3049
 
@@ -2886,60 +3069,183 @@ function peg$parse(input, options) {
2886
3069
  peg$silentFails--;
2887
3070
  if (s0 === peg$FAILED) {
2888
3071
  s1 = peg$FAILED;
2889
- if (peg$silentFails === 0) { peg$fail(peg$e67); }
3072
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
2890
3073
  }
2891
3074
 
2892
3075
  return s0;
2893
3076
  }
2894
3077
 
2895
- function peg$parsescopeReference() {
2896
- var s0, s1;
3078
+ function peg$parseprotocolExpression() {
3079
+ var s0, s1, s2, s3, s4;
2897
3080
 
2898
- peg$silentFails++;
2899
3081
  s0 = peg$currPos;
2900
- s1 = peg$parseidentifier();
3082
+ s1 = peg$parsenamespace();
2901
3083
  if (s1 !== peg$FAILED) {
2902
- peg$savedPos = s0;
2903
- s1 = peg$f50(s1);
3084
+ if (input.substr(peg$currPos, 2) === peg$c42) {
3085
+ s2 = peg$c42;
3086
+ peg$currPos += 2;
3087
+ } else {
3088
+ s2 = peg$FAILED;
3089
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3090
+ }
3091
+ if (s2 !== peg$FAILED) {
3092
+ s3 = peg$parsehost();
3093
+ if (s3 !== peg$FAILED) {
3094
+ s4 = peg$parsepath();
3095
+ if (s4 === peg$FAILED) {
3096
+ s4 = null;
3097
+ }
3098
+ peg$savedPos = s0;
3099
+ s0 = peg$f47(s1, s3, s4);
3100
+ } else {
3101
+ peg$currPos = s0;
3102
+ s0 = peg$FAILED;
3103
+ }
3104
+ } else {
3105
+ peg$currPos = s0;
3106
+ s0 = peg$FAILED;
3107
+ }
3108
+ } else {
3109
+ peg$currPos = s0;
3110
+ s0 = peg$FAILED;
2904
3111
  }
2905
- s0 = s1;
2906
- peg$silentFails--;
2907
3112
  if (s0 === peg$FAILED) {
2908
- s1 = peg$FAILED;
2909
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
3113
+ s0 = peg$parseprimary();
3114
+ }
3115
+
3116
+ return s0;
3117
+ }
3118
+
3119
+ function peg$parsequalifiedReference() {
3120
+ var s0, s1, s2;
3121
+
3122
+ s0 = peg$currPos;
3123
+ s1 = peg$parsenamespace();
3124
+ if (s1 !== peg$FAILED) {
3125
+ s2 = peg$parsescopeReference();
3126
+ if (s2 !== peg$FAILED) {
3127
+ peg$savedPos = s0;
3128
+ s0 = peg$f48(s1, s2);
3129
+ } else {
3130
+ peg$currPos = s0;
3131
+ s0 = peg$FAILED;
3132
+ }
3133
+ } else {
3134
+ peg$currPos = s0;
3135
+ s0 = peg$FAILED;
3136
+ }
3137
+
3138
+ return s0;
3139
+ }
3140
+
3141
+ function peg$parsereference() {
3142
+ var s0;
3143
+
3144
+ s0 = peg$parserootDirectory();
3145
+ if (s0 === peg$FAILED) {
3146
+ s0 = peg$parsehomeDirectory();
3147
+ if (s0 === peg$FAILED) {
3148
+ s0 = peg$parsequalifiedReference();
3149
+ if (s0 === peg$FAILED) {
3150
+ s0 = peg$parsenamespace();
3151
+ if (s0 === peg$FAILED) {
3152
+ s0 = peg$parsescopeReference();
3153
+ }
3154
+ }
3155
+ }
2910
3156
  }
2911
3157
 
2912
3158
  return s0;
2913
3159
  }
2914
3160
 
2915
- function peg$parsescopeTraverse() {
3161
+ function peg$parserootDirectory() {
2916
3162
  var s0, s1, s2, s3;
2917
3163
 
2918
3164
  s0 = peg$currPos;
2919
- s1 = peg$parsescopeReference();
3165
+ if (input.charCodeAt(peg$currPos) === 47) {
3166
+ s1 = peg$c41;
3167
+ peg$currPos++;
3168
+ } else {
3169
+ s1 = peg$FAILED;
3170
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
3171
+ }
2920
3172
  if (s1 !== peg$FAILED) {
3173
+ s2 = peg$parsepathKey();
3174
+ if (s2 !== peg$FAILED) {
3175
+ peg$savedPos = s0;
3176
+ s0 = peg$f49(s2);
3177
+ } else {
3178
+ peg$currPos = s0;
3179
+ s0 = peg$FAILED;
3180
+ }
3181
+ } else {
3182
+ peg$currPos = s0;
3183
+ s0 = peg$FAILED;
3184
+ }
3185
+ if (s0 === peg$FAILED) {
3186
+ s0 = peg$currPos;
2921
3187
  if (input.charCodeAt(peg$currPos) === 47) {
2922
- s2 = peg$c24;
3188
+ s1 = peg$c41;
2923
3189
  peg$currPos++;
2924
3190
  } else {
2925
- s2 = peg$FAILED;
2926
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3191
+ s1 = peg$FAILED;
3192
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2927
3193
  }
2928
- if (s2 !== peg$FAILED) {
2929
- s3 = peg$parsepath();
3194
+ if (s1 !== peg$FAILED) {
3195
+ s2 = peg$currPos;
3196
+ peg$silentFails++;
3197
+ if (input.charCodeAt(peg$currPos) === 47) {
3198
+ s3 = peg$c41;
3199
+ peg$currPos++;
3200
+ } else {
3201
+ s3 = peg$FAILED;
3202
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
3203
+ }
3204
+ peg$silentFails--;
2930
3205
  if (s3 === peg$FAILED) {
2931
- s3 = null;
3206
+ s2 = undefined;
3207
+ } else {
3208
+ peg$currPos = s2;
3209
+ s2 = peg$FAILED;
3210
+ }
3211
+ if (s2 !== peg$FAILED) {
3212
+ peg$savedPos = s0;
3213
+ s0 = peg$f50();
3214
+ } else {
3215
+ peg$currPos = s0;
3216
+ s0 = peg$FAILED;
2932
3217
  }
2933
- peg$savedPos = s0;
2934
- s0 = peg$f51(s1, s3);
2935
3218
  } else {
2936
3219
  peg$currPos = s0;
2937
3220
  s0 = peg$FAILED;
2938
3221
  }
3222
+ }
3223
+
3224
+ return s0;
3225
+ }
3226
+
3227
+ function peg$parsescopeReference() {
3228
+ var s0, s1, s2;
3229
+
3230
+ peg$silentFails++;
3231
+ s0 = peg$currPos;
3232
+ s1 = peg$parseidentifier();
3233
+ if (s1 !== peg$FAILED) {
3234
+ s2 = peg$parseslashFollows();
3235
+ if (s2 === peg$FAILED) {
3236
+ s2 = null;
3237
+ }
3238
+ peg$savedPos = s0;
3239
+ s0 = peg$f51(s1, s2);
2939
3240
  } else {
2940
3241
  peg$currPos = s0;
2941
3242
  s0 = peg$FAILED;
2942
3243
  }
3244
+ peg$silentFails--;
3245
+ if (s0 === peg$FAILED) {
3246
+ s1 = peg$FAILED;
3247
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3248
+ }
2943
3249
 
2944
3250
  return s0;
2945
3251
  }
@@ -2950,11 +3256,11 @@ function peg$parse(input, options) {
2950
3256
  s0 = peg$currPos;
2951
3257
  s1 = peg$parse__();
2952
3258
  if (input.charCodeAt(peg$currPos) === 44) {
2953
- s2 = peg$c35;
3259
+ s2 = peg$c43;
2954
3260
  peg$currPos++;
2955
3261
  } else {
2956
3262
  s2 = peg$FAILED;
2957
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
3263
+ if (peg$silentFails === 0) { peg$fail(peg$e73); }
2958
3264
  }
2959
3265
  if (s2 !== peg$FAILED) {
2960
3266
  s3 = peg$parse__();
@@ -2971,16 +3277,45 @@ function peg$parse(input, options) {
2971
3277
  return s0;
2972
3278
  }
2973
3279
 
3280
+ function peg$parseslashFollows() {
3281
+ var s0, s1, s2;
3282
+
3283
+ s0 = peg$currPos;
3284
+ s1 = peg$currPos;
3285
+ peg$silentFails++;
3286
+ if (input.charCodeAt(peg$currPos) === 47) {
3287
+ s2 = peg$c41;
3288
+ peg$currPos++;
3289
+ } else {
3290
+ s2 = peg$FAILED;
3291
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
3292
+ }
3293
+ peg$silentFails--;
3294
+ if (s2 !== peg$FAILED) {
3295
+ peg$currPos = s1;
3296
+ s1 = undefined;
3297
+ } else {
3298
+ s1 = peg$FAILED;
3299
+ }
3300
+ if (s1 !== peg$FAILED) {
3301
+ peg$savedPos = s0;
3302
+ s1 = peg$f52();
3303
+ }
3304
+ s0 = s1;
3305
+
3306
+ return s0;
3307
+ }
3308
+
2974
3309
  function peg$parseshebang() {
2975
3310
  var s0, s1, s2, s3;
2976
3311
 
2977
3312
  s0 = peg$currPos;
2978
- if (input.substr(peg$currPos, 2) === peg$c36) {
2979
- s1 = peg$c36;
3313
+ if (input.substr(peg$currPos, 2) === peg$c44) {
3314
+ s1 = peg$c44;
2980
3315
  peg$currPos += 2;
2981
3316
  } else {
2982
3317
  s1 = peg$FAILED;
2983
- if (peg$silentFails === 0) { peg$fail(peg$e70); }
3318
+ if (peg$silentFails === 0) { peg$fail(peg$e74); }
2984
3319
  }
2985
3320
  if (s1 !== peg$FAILED) {
2986
3321
  s2 = [];
@@ -2989,7 +3324,7 @@ function peg$parse(input, options) {
2989
3324
  peg$currPos++;
2990
3325
  } else {
2991
3326
  s3 = peg$FAILED;
2992
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3327
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
2993
3328
  }
2994
3329
  while (s3 !== peg$FAILED) {
2995
3330
  s2.push(s3);
@@ -2998,15 +3333,74 @@ function peg$parse(input, options) {
2998
3333
  peg$currPos++;
2999
3334
  } else {
3000
3335
  s3 = peg$FAILED;
3001
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3336
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
3002
3337
  }
3003
3338
  }
3004
3339
  peg$savedPos = s0;
3005
- s0 = peg$f52();
3340
+ s0 = peg$f53();
3341
+ } else {
3342
+ peg$currPos = s0;
3343
+ s0 = peg$FAILED;
3344
+ }
3345
+
3346
+ return s0;
3347
+ }
3348
+
3349
+ function peg$parseshorthandFunction() {
3350
+ var s0, s1, s2, s3, s4;
3351
+
3352
+ peg$silentFails++;
3353
+ s0 = peg$currPos;
3354
+ if (input.charCodeAt(peg$currPos) === 61) {
3355
+ s1 = peg$c40;
3356
+ peg$currPos++;
3357
+ } else {
3358
+ s1 = peg$FAILED;
3359
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
3360
+ }
3361
+ if (s1 !== peg$FAILED) {
3362
+ s2 = peg$currPos;
3363
+ peg$silentFails++;
3364
+ if (input.charCodeAt(peg$currPos) === 61) {
3365
+ s3 = peg$c40;
3366
+ peg$currPos++;
3367
+ } else {
3368
+ s3 = peg$FAILED;
3369
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
3370
+ }
3371
+ peg$silentFails--;
3372
+ if (s3 === peg$FAILED) {
3373
+ s2 = undefined;
3374
+ } else {
3375
+ peg$currPos = s2;
3376
+ s2 = peg$FAILED;
3377
+ }
3378
+ if (s2 !== peg$FAILED) {
3379
+ s3 = peg$parse__();
3380
+ s4 = peg$parseimplicitParenthesesCallExpression();
3381
+ if (s4 !== peg$FAILED) {
3382
+ peg$savedPos = s0;
3383
+ s0 = peg$f54(s4);
3384
+ } else {
3385
+ peg$currPos = s0;
3386
+ s0 = peg$FAILED;
3387
+ }
3388
+ } else {
3389
+ peg$currPos = s0;
3390
+ s0 = peg$FAILED;
3391
+ }
3006
3392
  } else {
3007
3393
  peg$currPos = s0;
3008
3394
  s0 = peg$FAILED;
3009
3395
  }
3396
+ if (s0 === peg$FAILED) {
3397
+ s0 = peg$parseimplicitParenthesesCallExpression();
3398
+ }
3399
+ peg$silentFails--;
3400
+ if (s0 === peg$FAILED) {
3401
+ s1 = peg$FAILED;
3402
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
3403
+ }
3010
3404
 
3011
3405
  return s0;
3012
3406
  }
@@ -3019,7 +3413,7 @@ function peg$parse(input, options) {
3019
3413
  peg$currPos++;
3020
3414
  } else {
3021
3415
  s0 = peg$FAILED;
3022
- if (peg$silentFails === 0) { peg$fail(peg$e72); }
3416
+ if (peg$silentFails === 0) { peg$fail(peg$e77); }
3023
3417
  }
3024
3418
 
3025
3419
  return s0;
@@ -3029,19 +3423,19 @@ function peg$parse(input, options) {
3029
3423
  var s0;
3030
3424
 
3031
3425
  if (input.charCodeAt(peg$currPos) === 8594) {
3032
- s0 = peg$c37;
3426
+ s0 = peg$c45;
3033
3427
  peg$currPos++;
3034
3428
  } else {
3035
3429
  s0 = peg$FAILED;
3036
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
3430
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3037
3431
  }
3038
3432
  if (s0 === peg$FAILED) {
3039
- if (input.substr(peg$currPos, 2) === peg$c38) {
3040
- s0 = peg$c38;
3433
+ if (input.substr(peg$currPos, 2) === peg$c46) {
3434
+ s0 = peg$c46;
3041
3435
  peg$currPos += 2;
3042
3436
  } else {
3043
3437
  s0 = peg$FAILED;
3044
- if (peg$silentFails === 0) { peg$fail(peg$e74); }
3438
+ if (peg$silentFails === 0) { peg$fail(peg$e79); }
3045
3439
  }
3046
3440
  }
3047
3441
 
@@ -3052,12 +3446,12 @@ function peg$parse(input, options) {
3052
3446
  var s0, s1, s2, s3;
3053
3447
 
3054
3448
  s0 = peg$currPos;
3055
- if (input.substr(peg$currPos, 2) === peg$c0) {
3056
- s1 = peg$c0;
3449
+ if (input.substr(peg$currPos, 2) === peg$c42) {
3450
+ s1 = peg$c42;
3057
3451
  peg$currPos += 2;
3058
3452
  } else {
3059
3453
  s1 = peg$FAILED;
3060
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
3454
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3061
3455
  }
3062
3456
  if (s1 !== peg$FAILED) {
3063
3457
  s2 = [];
@@ -3066,7 +3460,7 @@ function peg$parse(input, options) {
3066
3460
  peg$currPos++;
3067
3461
  } else {
3068
3462
  s3 = peg$FAILED;
3069
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3463
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
3070
3464
  }
3071
3465
  while (s3 !== peg$FAILED) {
3072
3466
  s2.push(s3);
@@ -3075,11 +3469,11 @@ function peg$parse(input, options) {
3075
3469
  peg$currPos++;
3076
3470
  } else {
3077
3471
  s3 = peg$FAILED;
3078
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3472
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
3079
3473
  }
3080
3474
  }
3081
3475
  peg$savedPos = s0;
3082
- s0 = peg$f53();
3476
+ s0 = peg$f55();
3083
3477
  } else {
3084
3478
  peg$currPos = s0;
3085
3479
  s0 = peg$FAILED;
@@ -3094,11 +3488,11 @@ function peg$parse(input, options) {
3094
3488
  peg$silentFails++;
3095
3489
  s0 = peg$currPos;
3096
3490
  if (input.charCodeAt(peg$currPos) === 39) {
3097
- s1 = peg$c39;
3491
+ s1 = peg$c47;
3098
3492
  peg$currPos++;
3099
3493
  } else {
3100
3494
  s1 = peg$FAILED;
3101
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
3495
+ if (peg$silentFails === 0) { peg$fail(peg$e81); }
3102
3496
  }
3103
3497
  if (s1 !== peg$FAILED) {
3104
3498
  s2 = [];
@@ -3108,15 +3502,15 @@ function peg$parse(input, options) {
3108
3502
  s3 = peg$parsesingleQuoteStringChar();
3109
3503
  }
3110
3504
  if (input.charCodeAt(peg$currPos) === 39) {
3111
- s3 = peg$c39;
3505
+ s3 = peg$c47;
3112
3506
  peg$currPos++;
3113
3507
  } else {
3114
3508
  s3 = peg$FAILED;
3115
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
3509
+ if (peg$silentFails === 0) { peg$fail(peg$e81); }
3116
3510
  }
3117
3511
  if (s3 !== peg$FAILED) {
3118
3512
  peg$savedPos = s0;
3119
- s0 = peg$f54(s2);
3513
+ s0 = peg$f56(s2);
3120
3514
  } else {
3121
3515
  peg$currPos = s0;
3122
3516
  s0 = peg$FAILED;
@@ -3128,7 +3522,7 @@ function peg$parse(input, options) {
3128
3522
  peg$silentFails--;
3129
3523
  if (s0 === peg$FAILED) {
3130
3524
  s1 = peg$FAILED;
3131
- if (peg$silentFails === 0) { peg$fail(peg$e75); }
3525
+ if (peg$silentFails === 0) { peg$fail(peg$e80); }
3132
3526
  }
3133
3527
 
3134
3528
  return s0;
@@ -3141,11 +3535,11 @@ function peg$parse(input, options) {
3141
3535
  s1 = peg$currPos;
3142
3536
  peg$silentFails++;
3143
3537
  if (input.charCodeAt(peg$currPos) === 39) {
3144
- s2 = peg$c39;
3538
+ s2 = peg$c47;
3145
3539
  peg$currPos++;
3146
3540
  } else {
3147
3541
  s2 = peg$FAILED;
3148
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
3542
+ if (peg$silentFails === 0) { peg$fail(peg$e81); }
3149
3543
  }
3150
3544
  if (s2 === peg$FAILED) {
3151
3545
  s2 = peg$parsenewLine();
@@ -3174,15 +3568,16 @@ function peg$parse(input, options) {
3174
3568
  }
3175
3569
 
3176
3570
  function peg$parsespread() {
3177
- var s0, s1, s2;
3571
+ var s0, s1, s2, s3;
3178
3572
 
3179
3573
  s0 = peg$currPos;
3180
3574
  s1 = peg$parseellipsis();
3181
3575
  if (s1 !== peg$FAILED) {
3182
- s2 = peg$parsevalue();
3183
- if (s2 !== peg$FAILED) {
3576
+ s2 = peg$parse__();
3577
+ s3 = peg$parseconditionalExpression();
3578
+ if (s3 !== peg$FAILED) {
3184
3579
  peg$savedPos = s0;
3185
- s0 = peg$f55(s2);
3580
+ s0 = peg$f57(s3);
3186
3581
  } else {
3187
3582
  peg$currPos = s0;
3188
3583
  s0 = peg$FAILED;
@@ -3195,15 +3590,7 @@ function peg$parse(input, options) {
3195
3590
  return s0;
3196
3591
  }
3197
3592
 
3198
- function peg$parsestart() {
3199
- var s0;
3200
-
3201
- s0 = peg$parsenumber();
3202
-
3203
- return s0;
3204
- }
3205
-
3206
- function peg$parsestring() {
3593
+ function peg$parsestringLiteral() {
3207
3594
  var s0, s1;
3208
3595
 
3209
3596
  peg$silentFails++;
@@ -3217,48 +3604,7 @@ function peg$parse(input, options) {
3217
3604
  peg$silentFails--;
3218
3605
  if (s0 === peg$FAILED) {
3219
3606
  s1 = peg$FAILED;
3220
- if (peg$silentFails === 0) { peg$fail(peg$e77); }
3221
- }
3222
-
3223
- return s0;
3224
- }
3225
-
3226
- function peg$parsetaggedTemplate() {
3227
- var s0, s1, s2, s3, s4;
3228
-
3229
- s0 = peg$currPos;
3230
- s1 = peg$parsecallTarget();
3231
- if (s1 !== peg$FAILED) {
3232
- if (input.charCodeAt(peg$currPos) === 96) {
3233
- s2 = peg$c40;
3234
- peg$currPos++;
3235
- } else {
3236
- s2 = peg$FAILED;
3237
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3238
- }
3239
- if (s2 !== peg$FAILED) {
3240
- s3 = peg$parsetemplateLiteralContents();
3241
- if (input.charCodeAt(peg$currPos) === 96) {
3242
- s4 = peg$c40;
3243
- peg$currPos++;
3244
- } else {
3245
- s4 = peg$FAILED;
3246
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3247
- }
3248
- if (s4 !== peg$FAILED) {
3249
- peg$savedPos = s0;
3250
- s0 = peg$f56(s1, s3);
3251
- } else {
3252
- peg$currPos = s0;
3253
- s0 = peg$FAILED;
3254
- }
3255
- } else {
3256
- peg$currPos = s0;
3257
- s0 = peg$FAILED;
3258
- }
3259
- } else {
3260
- peg$currPos = s0;
3261
- s0 = peg$FAILED;
3607
+ if (peg$silentFails === 0) { peg$fail(peg$e82); }
3262
3608
  }
3263
3609
 
3264
3610
  return s0;
@@ -3271,11 +3617,11 @@ function peg$parse(input, options) {
3271
3617
  s0 = peg$currPos;
3272
3618
  s1 = peg$parsetemplateDocumentContents();
3273
3619
  peg$savedPos = s0;
3274
- s1 = peg$f57(s1);
3620
+ s1 = peg$f58(s1);
3275
3621
  s0 = s1;
3276
3622
  peg$silentFails--;
3277
3623
  s1 = peg$FAILED;
3278
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
3624
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
3279
3625
 
3280
3626
  return s0;
3281
3627
  }
@@ -3286,12 +3632,12 @@ function peg$parse(input, options) {
3286
3632
  s0 = peg$currPos;
3287
3633
  s1 = peg$currPos;
3288
3634
  peg$silentFails++;
3289
- if (input.substr(peg$currPos, 2) === peg$c41) {
3290
- s2 = peg$c41;
3635
+ if (input.substr(peg$currPos, 2) === peg$c48) {
3636
+ s2 = peg$c48;
3291
3637
  peg$currPos += 2;
3292
3638
  } else {
3293
3639
  s2 = peg$FAILED;
3294
- if (peg$silentFails === 0) { peg$fail(peg$e80); }
3640
+ if (peg$silentFails === 0) { peg$fail(peg$e84); }
3295
3641
  }
3296
3642
  peg$silentFails--;
3297
3643
  if (s2 === peg$FAILED) {
@@ -3346,7 +3692,7 @@ function peg$parse(input, options) {
3346
3692
  }
3347
3693
  }
3348
3694
  peg$savedPos = s0;
3349
- s0 = peg$f58(s1, s2);
3695
+ s0 = peg$f59(s1, s2);
3350
3696
 
3351
3697
  return s0;
3352
3698
  }
@@ -3363,11 +3709,11 @@ function peg$parse(input, options) {
3363
3709
  s2 = peg$parsetemplateDocumentChar();
3364
3710
  }
3365
3711
  peg$savedPos = s0;
3366
- s1 = peg$f59(s1);
3712
+ s1 = peg$f60(s1);
3367
3713
  s0 = s1;
3368
3714
  peg$silentFails--;
3369
3715
  s1 = peg$FAILED;
3370
- if (peg$silentFails === 0) { peg$fail(peg$e81); }
3716
+ if (peg$silentFails === 0) { peg$fail(peg$e85); }
3371
3717
 
3372
3718
  return s0;
3373
3719
  }
@@ -3378,24 +3724,24 @@ function peg$parse(input, options) {
3378
3724
  peg$silentFails++;
3379
3725
  s0 = peg$currPos;
3380
3726
  if (input.charCodeAt(peg$currPos) === 96) {
3381
- s1 = peg$c40;
3727
+ s1 = peg$c49;
3382
3728
  peg$currPos++;
3383
3729
  } else {
3384
3730
  s1 = peg$FAILED;
3385
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3731
+ if (peg$silentFails === 0) { peg$fail(peg$e87); }
3386
3732
  }
3387
3733
  if (s1 !== peg$FAILED) {
3388
3734
  s2 = peg$parsetemplateLiteralContents();
3389
3735
  if (input.charCodeAt(peg$currPos) === 96) {
3390
- s3 = peg$c40;
3736
+ s3 = peg$c49;
3391
3737
  peg$currPos++;
3392
3738
  } else {
3393
3739
  s3 = peg$FAILED;
3394
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3740
+ if (peg$silentFails === 0) { peg$fail(peg$e87); }
3395
3741
  }
3396
3742
  if (s3 !== peg$FAILED) {
3397
3743
  peg$savedPos = s0;
3398
- s0 = peg$f60(s2);
3744
+ s0 = peg$f61(s2);
3399
3745
  } else {
3400
3746
  peg$currPos = s0;
3401
3747
  s0 = peg$FAILED;
@@ -3407,7 +3753,7 @@ function peg$parse(input, options) {
3407
3753
  peg$silentFails--;
3408
3754
  if (s0 === peg$FAILED) {
3409
3755
  s1 = peg$FAILED;
3410
- if (peg$silentFails === 0) { peg$fail(peg$e82); }
3756
+ if (peg$silentFails === 0) { peg$fail(peg$e86); }
3411
3757
  }
3412
3758
 
3413
3759
  return s0;
@@ -3420,19 +3766,19 @@ function peg$parse(input, options) {
3420
3766
  s1 = peg$currPos;
3421
3767
  peg$silentFails++;
3422
3768
  if (input.charCodeAt(peg$currPos) === 96) {
3423
- s2 = peg$c40;
3769
+ s2 = peg$c49;
3424
3770
  peg$currPos++;
3425
3771
  } else {
3426
3772
  s2 = peg$FAILED;
3427
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
3773
+ if (peg$silentFails === 0) { peg$fail(peg$e87); }
3428
3774
  }
3429
3775
  if (s2 === peg$FAILED) {
3430
- if (input.substr(peg$currPos, 2) === peg$c41) {
3431
- s2 = peg$c41;
3776
+ if (input.substr(peg$currPos, 2) === peg$c48) {
3777
+ s2 = peg$c48;
3432
3778
  peg$currPos += 2;
3433
3779
  } else {
3434
3780
  s2 = peg$FAILED;
3435
- if (peg$silentFails === 0) { peg$fail(peg$e80); }
3781
+ if (peg$silentFails === 0) { peg$fail(peg$e84); }
3436
3782
  }
3437
3783
  }
3438
3784
  peg$silentFails--;
@@ -3504,7 +3850,7 @@ function peg$parse(input, options) {
3504
3850
  s2 = peg$parsetemplateLiteralChar();
3505
3851
  }
3506
3852
  peg$savedPos = s0;
3507
- s1 = peg$f61(s1);
3853
+ s1 = peg$f62(s1);
3508
3854
  s0 = s1;
3509
3855
 
3510
3856
  return s0;
@@ -3515,25 +3861,26 @@ function peg$parse(input, options) {
3515
3861
 
3516
3862
  peg$silentFails++;
3517
3863
  s0 = peg$currPos;
3518
- if (input.substr(peg$currPos, 2) === peg$c41) {
3519
- s1 = peg$c41;
3864
+ if (input.substr(peg$currPos, 2) === peg$c48) {
3865
+ s1 = peg$c48;
3520
3866
  peg$currPos += 2;
3521
3867
  } else {
3522
3868
  s1 = peg$FAILED;
3523
- if (peg$silentFails === 0) { peg$fail(peg$e80); }
3869
+ if (peg$silentFails === 0) { peg$fail(peg$e84); }
3524
3870
  }
3525
3871
  if (s1 !== peg$FAILED) {
3526
3872
  s2 = peg$parseexpression();
3527
3873
  if (s2 !== peg$FAILED) {
3528
3874
  if (input.charCodeAt(peg$currPos) === 125) {
3529
- s3 = peg$c2;
3875
+ s3 = peg$c3;
3530
3876
  peg$currPos++;
3531
3877
  } else {
3532
3878
  s3 = peg$FAILED;
3533
3879
  if (peg$silentFails === 0) { peg$fail(peg$e6); }
3534
3880
  }
3535
3881
  if (s3 !== peg$FAILED) {
3536
- s0 = s2;
3882
+ peg$savedPos = s0;
3883
+ s0 = peg$f63(s2);
3537
3884
  } else {
3538
3885
  peg$currPos = s0;
3539
3886
  s0 = peg$FAILED;
@@ -3549,7 +3896,7 @@ function peg$parse(input, options) {
3549
3896
  peg$silentFails--;
3550
3897
  if (s0 === peg$FAILED) {
3551
3898
  s1 = peg$FAILED;
3552
- if (peg$silentFails === 0) { peg$fail(peg$e83); }
3899
+ if (peg$silentFails === 0) { peg$fail(peg$e88); }
3553
3900
  }
3554
3901
 
3555
3902
  return s0;
@@ -3572,54 +3919,41 @@ function peg$parse(input, options) {
3572
3919
  return s0;
3573
3920
  }
3574
3921
 
3575
- function peg$parsevalue() {
3576
- var s0;
3922
+ function peg$parseunaryExpression() {
3923
+ var s0, s1, s2, s3;
3577
3924
 
3578
- s0 = peg$parsenumber();
3579
- if (s0 === peg$FAILED) {
3580
- s0 = peg$parseparameterizedLambda();
3581
- if (s0 === peg$FAILED) {
3582
- s0 = peg$parsefunctionComposition();
3583
- if (s0 === peg$FAILED) {
3584
- s0 = peg$parsetaggedTemplate();
3585
- if (s0 === peg$FAILED) {
3586
- s0 = peg$parsenamespacePath();
3587
- if (s0 === peg$FAILED) {
3588
- s0 = peg$parseabsoluteFilePath();
3589
- if (s0 === peg$FAILED) {
3590
- s0 = peg$parsearray();
3591
- if (s0 === peg$FAILED) {
3592
- s0 = peg$parseobject();
3593
- if (s0 === peg$FAILED) {
3594
- s0 = peg$parselambda();
3595
- if (s0 === peg$FAILED) {
3596
- s0 = peg$parsetemplateLiteral();
3597
- if (s0 === peg$FAILED) {
3598
- s0 = peg$parsestring();
3599
- if (s0 === peg$FAILED) {
3600
- s0 = peg$parsegroup();
3601
- if (s0 === peg$FAILED) {
3602
- s0 = peg$parsehomeTree();
3603
- if (s0 === peg$FAILED) {
3604
- s0 = peg$parsescopeTraverse();
3605
- if (s0 === peg$FAILED) {
3606
- s0 = peg$parsenamespace();
3607
- if (s0 === peg$FAILED) {
3608
- s0 = peg$parsescopeReference();
3609
- }
3610
- }
3611
- }
3612
- }
3613
- }
3614
- }
3615
- }
3616
- }
3617
- }
3618
- }
3619
- }
3620
- }
3621
- }
3925
+ s0 = peg$currPos;
3926
+ s1 = peg$parseunaryOperator();
3927
+ if (s1 !== peg$FAILED) {
3928
+ s2 = peg$parse__();
3929
+ s3 = peg$parseunaryExpression();
3930
+ if (s3 !== peg$FAILED) {
3931
+ peg$savedPos = s0;
3932
+ s0 = peg$f64(s1, s3);
3933
+ } else {
3934
+ peg$currPos = s0;
3935
+ s0 = peg$FAILED;
3622
3936
  }
3937
+ } else {
3938
+ peg$currPos = s0;
3939
+ s0 = peg$FAILED;
3940
+ }
3941
+ if (s0 === peg$FAILED) {
3942
+ s0 = peg$parsecallExpression();
3943
+ }
3944
+
3945
+ return s0;
3946
+ }
3947
+
3948
+ function peg$parseunaryOperator() {
3949
+ var s0;
3950
+
3951
+ if (input.charCodeAt(peg$currPos) === 33) {
3952
+ s0 = peg$c50;
3953
+ peg$currPos++;
3954
+ } else {
3955
+ s0 = peg$FAILED;
3956
+ if (peg$silentFails === 0) { peg$fail(peg$e89); }
3623
3957
  }
3624
3958
 
3625
3959
  return s0;
@@ -3682,47 +4016,49 @@ function peg$parse(input, options) {
3682
4016
 
3683
4017
  const peg$allowedStartRules = [
3684
4018
  "__",
3685
- "absoluteFilePath",
3686
- "args",
3687
- "array",
4019
+ "arguments",
4020
+ "arrayLiteral",
3688
4021
  "arrayEntries",
3689
4022
  "arrayEntry",
3690
- "callTarget",
4023
+ "arrowFunction",
4024
+ "callExpression",
3691
4025
  "closingBrace",
3692
4026
  "closingBracket",
3693
- "closingParen",
4027
+ "closingParenthesis",
3694
4028
  "comment",
4029
+ "conditionalExpression",
3695
4030
  "digits",
3696
4031
  "doubleArrow",
3697
4032
  "doubleQuoteString",
3698
4033
  "doubleQuoteStringChar",
3699
- "doubleSlashPath",
3700
4034
  "ellipsis",
4035
+ "equalityExpression",
4036
+ "equalityOperator",
3701
4037
  "escapedChar",
3702
4038
  "expression",
3703
- "float",
3704
- "functionComposition",
3705
- "functionReference",
4039
+ "floatLiteral",
3706
4040
  "group",
3707
4041
  "guillemetString",
3708
4042
  "guillemetStringChar",
3709
- "homeTree",
4043
+ "homeDirectory",
3710
4044
  "host",
3711
4045
  "identifier",
3712
4046
  "identifierChar",
3713
4047
  "identifierList",
3714
- "implicitParensArgs",
4048
+ "implicitParenthesesCallExpression",
4049
+ "implicitParensthesesArguments",
3715
4050
  "inlineSpace",
3716
- "integer",
3717
- "lambda",
3718
- "leadingSlashPath",
4051
+ "integerLiteral",
3719
4052
  "list",
4053
+ "literal",
4054
+ "logicalAndExpression",
4055
+ "logicalOrExpression",
3720
4056
  "multiLineComment",
3721
4057
  "namespace",
3722
- "namespacePath",
3723
4058
  "newLine",
3724
- "number",
3725
- "object",
4059
+ "numericLiteral",
4060
+ "nullishCoalescingExpression",
4061
+ "objectLiteral",
3726
4062
  "objectEntries",
3727
4063
  "objectEntry",
3728
4064
  "objectGetter",
@@ -3731,28 +4067,31 @@ const peg$allowedStartRules = [
3731
4067
  "objectProperty",
3732
4068
  "objectShorthandProperty",
3733
4069
  "objectPublicKey",
3734
- "parameterizedLambda",
3735
- "parensArgs",
4070
+ "parenthesesArguments",
3736
4071
  "path",
3737
- "pathElement",
3738
- "pathKeyChar",
3739
- "pathTail",
3740
- "pipeline",
3741
- "pipelineStep",
4072
+ "pathArguments",
4073
+ "pathKey",
4074
+ "pathSegment",
4075
+ "pathSegmentChar",
4076
+ "pipelineExpression",
4077
+ "primary",
3742
4078
  "program",
4079
+ "protocolExpression",
4080
+ "qualifiedReference",
4081
+ "reference",
4082
+ "rootDirectory",
3743
4083
  "scopeReference",
3744
- "scopeTraverse",
3745
4084
  "separator",
4085
+ "slashFollows",
3746
4086
  "shebang",
4087
+ "shorthandFunction",
3747
4088
  "sign",
3748
4089
  "singleArrow",
3749
4090
  "singleLineComment",
3750
4091
  "singleQuoteString",
3751
4092
  "singleQuoteStringChar",
3752
4093
  "spread",
3753
- "start",
3754
- "string",
3755
- "taggedTemplate",
4094
+ "stringLiteral",
3756
4095
  "templateDocument",
3757
4096
  "templateDocumentChar",
3758
4097
  "templateDocumentContents",
@@ -3763,7 +4102,8 @@ const peg$allowedStartRules = [
3763
4102
  "templateLiteralText",
3764
4103
  "templateSubstitution",
3765
4104
  "textChar",
3766
- "value",
4105
+ "unaryExpression",
4106
+ "unaryOperator",
3767
4107
  "whitespaceWithNewLine"
3768
4108
  ];
3769
4109