@weborigami/language 0.0.40 → 0.0.42

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.
@@ -11,7 +11,17 @@
11
11
  //
12
12
 
13
13
  import * as ops from "../runtime/ops.js";
14
- import { makeFunctionCall, makeTemplate } from "./parserHelpers.js";
14
+ import { makeFunctionCall, makePipeline, makeTemplate } from "./parserHelpers.js";
15
+
16
+ // If a parse result is an object that will be evaluated at runtime, attach the
17
+ // location of the source code that produced it for debugging and error messages.
18
+ function annotate(parseResult, location) {
19
+ if (typeof parseResult === "object" && parseResult !== null) {
20
+ parseResult.location = location;
21
+ }
22
+ return parseResult;
23
+ }
24
+
15
25
 
16
26
  function peg$subclass(child, parent) {
17
27
  function C() { this.constructor = child; }
@@ -182,146 +192,184 @@ function peg$parse(input, options) {
182
192
  var peg$FAILED = {};
183
193
  var peg$source = options.grammarSource;
184
194
 
185
- var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, argsChain: peg$parseargsChain, assignment: peg$parseassignment, assignmentOrShorthand: peg$parseassignmentOrShorthand, array: peg$parsearray, callTarget: peg$parsecallTarget, comment: peg$parsecomment, digits: peg$parsedigits, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, escapedChar: peg$parseescapedChar, expr: peg$parseexpr, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, group: peg$parsegroup, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, implicitParensCall: peg$parseimplicitParensCall, host: peg$parsehost, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectProperties: peg$parseobjectProperties, objectProperty: peg$parseobjectProperty, objectPropertyOrShorthand: peg$parseobjectPropertyOrShorthand, parensArgs: peg$parseparensArgs, separator: peg$parseseparator, sign: peg$parsesign, path: peg$parsepath, pathKey: peg$parsepathKey, protocolCall: peg$parseprotocolCall, protocol: peg$parseprotocol, reservedProtocol: peg$parsereservedProtocol, scopeReference: peg$parsescopeReference, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, start: peg$parsestart, string: peg$parsestring, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, tree: peg$parsetree, treeAssignments: peg$parsetreeAssignments, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
195
+ var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, args: peg$parseargs, array: peg$parsearray, assignment: peg$parseassignment, assignmentOrShorthand: peg$parseassignmentOrShorthand, 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, escapedChar: peg$parseescapedChar, expr: peg$parseexpr, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, group: peg$parsegroup, 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, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectProperties: peg$parseobjectProperties, objectProperty: peg$parseobjectProperty, objectPropertyOrShorthand: peg$parseobjectPropertyOrShorthand, parameterizedLambda: peg$parseparameterizedLambda, parensArgs: peg$parseparensArgs, pipeline: peg$parsepipeline, path: peg$parsepath, pathKey: peg$parsepathKey, protocolCall: peg$parseprotocolCall, protocol: peg$parseprotocol, reservedProtocol: peg$parsereservedProtocol, scopeReference: peg$parsescopeReference, separator: peg$parseseparator, sign: peg$parsesign, singleArrow: peg$parsesingleArrow, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, step: peg$parsestep, start: peg$parsestart, string: peg$parsestring, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, tree: peg$parsetree, treeAssignments: peg$parsetreeAssignments, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
186
196
  var peg$startRuleFunction = peg$parse__;
187
197
 
188
- var peg$c0 = "=";
189
- var peg$c1 = "[";
190
- var peg$c2 = "]";
191
- var peg$c3 = "#";
192
- var peg$c4 = "\"";
193
- var peg$c5 = "\\";
194
- var peg$c6 = ".";
195
- var peg$c7 = "(";
196
- var peg$c8 = ")";
197
- var peg$c9 = ":";
198
- var peg$c10 = "/";
199
- var peg$c11 = "\n";
200
- var peg$c12 = "\r\n";
201
- var peg$c13 = "\r";
202
- var peg$c14 = "{";
203
- var peg$c15 = "}";
204
- var peg$c16 = ",";
205
- var peg$c17 = "https";
206
- var peg$c18 = "http";
207
- var peg$c19 = "package";
208
- var peg$c20 = "treehttps";
209
- var peg$c21 = "treehttp";
210
- var peg$c22 = "tree";
211
- var peg$c23 = "'";
212
- var peg$c24 = "{{";
213
- var peg$c25 = "`";
214
- var peg$c26 = "}}";
198
+ var peg$c0 = "[";
199
+ var peg$c1 = "=";
200
+ var peg$c2 = "}";
201
+ var peg$c3 = "]";
202
+ var peg$c4 = ")";
203
+ var peg$c5 = "#";
204
+ var peg$c6 = "\u21D2";
205
+ var peg$c7 = "=>";
206
+ var peg$c8 = "\"";
207
+ var peg$c9 = "\\";
208
+ var peg$c10 = ".";
209
+ var peg$c11 = "(";
210
+ var peg$c12 = ":";
211
+ var peg$c13 = "-";
212
+ var peg$c14 = ">";
213
+ var peg$c15 = "/";
214
+ var peg$c16 = "\n";
215
+ var peg$c17 = "\r\n";
216
+ var peg$c18 = "\r";
217
+ var peg$c19 = "{";
218
+ var peg$c20 = "https";
219
+ var peg$c21 = "http";
220
+ var peg$c22 = "package";
221
+ var peg$c23 = "treehttps";
222
+ var peg$c24 = "treehttp";
223
+ var peg$c25 = "tree";
224
+ var peg$c26 = ",";
225
+ var peg$c27 = "\u2192";
226
+ var peg$c28 = "->";
227
+ var peg$c29 = "'";
228
+ var peg$c30 = "{{";
229
+ var peg$c31 = "`";
230
+ var peg$c32 = "}}";
215
231
 
216
232
  var peg$r0 = /^[^\n\r]/;
217
233
  var peg$r1 = /^[0-9]/;
218
- var peg$r2 = /^[^(){}[\],\/:=`"'\\# \t\n\r]/;
234
+ var peg$r2 = /^[^(){}[\]<>\-=,\/:`"'\\# \u2192\u21D2\t\n\r]/;
219
235
  var peg$r3 = /^[ \t]/;
220
236
  var peg$r4 = /^[+\-]/;
221
237
 
222
238
  var peg$e0 = peg$otherExpectation("absolute file path");
223
239
  var peg$e1 = peg$otherExpectation("function arguments");
224
- var peg$e2 = peg$otherExpectation("tree assignment");
225
- var peg$e3 = peg$literalExpectation("=", false);
226
- var peg$e4 = peg$otherExpectation("array");
227
- var peg$e5 = peg$literalExpectation("[", false);
228
- var peg$e6 = peg$literalExpectation("]", false);
229
- var peg$e7 = peg$otherExpectation("function call");
230
- var peg$e8 = peg$otherExpectation("comment");
231
- var peg$e9 = peg$literalExpectation("#", false);
232
- var peg$e10 = peg$classExpectation(["\n", "\r"], true, false);
233
- var peg$e11 = peg$classExpectation([["0", "9"]], false, false);
234
- var peg$e12 = peg$otherExpectation("double quote string");
235
- var peg$e13 = peg$literalExpectation("\"", false);
236
- var peg$e14 = peg$otherExpectation("backslash-escaped character");
237
- var peg$e15 = peg$literalExpectation("\\", false);
238
- var peg$e16 = peg$anyExpectation();
239
- var peg$e17 = peg$otherExpectation("expression");
240
- var peg$e18 = peg$otherExpectation("Origami expression");
241
- var peg$e19 = peg$otherExpectation("floating-point number");
242
- var peg$e20 = peg$literalExpectation(".", false);
243
- var peg$e21 = peg$otherExpectation("function composition");
244
- var peg$e22 = peg$otherExpectation("parenthetical group");
245
- var peg$e23 = peg$literalExpectation("(", false);
246
- var peg$e24 = peg$literalExpectation(")", false);
247
- var peg$e25 = peg$otherExpectation("identifier");
248
- var peg$e26 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", "/", ":", "=", "`", "\"", "'", "\\", "#", " ", "\t", "\n", "\r"], true, false);
249
- var peg$e27 = peg$otherExpectation("function call with implicit parentheses");
250
- var peg$e28 = peg$otherExpectation("HTTP/HTTPS host");
251
- var peg$e29 = peg$literalExpectation(":", false);
252
- var peg$e30 = peg$classExpectation([" ", "\t"], false, false);
253
- var peg$e31 = peg$otherExpectation("integer");
254
- var peg$e32 = peg$otherExpectation("lambda function");
255
- var peg$e33 = peg$otherExpectation("path with a leading slash");
256
- var peg$e34 = peg$literalExpectation("/", false);
257
- var peg$e35 = peg$otherExpectation("list");
258
- var peg$e36 = peg$literalExpectation("\n", false);
259
- var peg$e37 = peg$literalExpectation("\r\n", false);
260
- var peg$e38 = peg$literalExpectation("\r", false);
261
- var peg$e39 = peg$otherExpectation("number");
262
- var peg$e40 = peg$otherExpectation("object literal");
263
- var peg$e41 = peg$literalExpectation("{", false);
264
- var peg$e42 = peg$literalExpectation("}", false);
265
- var peg$e43 = peg$otherExpectation("object property");
266
- var peg$e44 = peg$otherExpectation("function arguments in parentheses");
267
- var peg$e45 = peg$literalExpectation(",", false);
268
- var peg$e46 = peg$classExpectation(["+", "-"], false, false);
269
- var peg$e47 = peg$otherExpectation("slash-separated path");
270
- var peg$e48 = peg$otherExpectation("path element");
271
- var peg$e49 = peg$otherExpectation("function call using protocol: syntax");
272
- var peg$e50 = peg$otherExpectation("protocol");
273
- var peg$e51 = peg$otherExpectation("reserved protocol");
274
- var peg$e52 = peg$literalExpectation("https", false);
275
- var peg$e53 = peg$literalExpectation("http", false);
276
- var peg$e54 = peg$literalExpectation("package", false);
277
- var peg$e55 = peg$literalExpectation("treehttps", false);
278
- var peg$e56 = peg$literalExpectation("treehttp", false);
279
- var peg$e57 = peg$literalExpectation("tree", false);
280
- var peg$e58 = peg$otherExpectation("scope reference");
281
- var peg$e59 = peg$otherExpectation("single quote string");
282
- var peg$e60 = peg$literalExpectation("'", false);
283
- var peg$e61 = peg$otherExpectation("string");
284
- var peg$e62 = peg$otherExpectation("template");
285
- var peg$e63 = peg$literalExpectation("{{", false);
286
- var peg$e64 = peg$otherExpectation("template text");
287
- var peg$e65 = peg$otherExpectation("template literal");
288
- var peg$e66 = peg$literalExpectation("`", false);
289
- var peg$e67 = peg$otherExpectation("template substitution");
290
- var peg$e68 = peg$literalExpectation("}}", false);
291
- var peg$e69 = peg$otherExpectation("tree literal");
240
+ var peg$e2 = peg$otherExpectation("array");
241
+ var peg$e3 = peg$literalExpectation("[", false);
242
+ var peg$e4 = peg$otherExpectation("tree assignment");
243
+ var peg$e5 = peg$literalExpectation("=", false);
244
+ var peg$e6 = peg$otherExpectation("function call");
245
+ var peg$e7 = peg$literalExpectation("}", false);
246
+ var peg$e8 = peg$anyExpectation();
247
+ var peg$e9 = peg$literalExpectation("]", false);
248
+ var peg$e10 = peg$literalExpectation(")", false);
249
+ var peg$e11 = peg$otherExpectation("comment");
250
+ var peg$e12 = peg$literalExpectation("#", false);
251
+ var peg$e13 = peg$classExpectation(["\n", "\r"], true, false);
252
+ var peg$e14 = peg$classExpectation([["0", "9"]], false, false);
253
+ var peg$e15 = peg$literalExpectation("\u21D2", false);
254
+ var peg$e16 = peg$literalExpectation("=>", false);
255
+ var peg$e17 = peg$otherExpectation("double quote string");
256
+ var peg$e18 = peg$literalExpectation("\"", false);
257
+ var peg$e19 = peg$otherExpectation("backslash-escaped character");
258
+ var peg$e20 = peg$literalExpectation("\\", false);
259
+ var peg$e21 = peg$otherExpectation("Origami expression");
260
+ var peg$e22 = peg$otherExpectation("floating-point number");
261
+ var peg$e23 = peg$literalExpectation(".", false);
262
+ var peg$e24 = peg$otherExpectation("function composition");
263
+ var peg$e25 = peg$otherExpectation("parenthetical group");
264
+ var peg$e26 = peg$literalExpectation("(", false);
265
+ var peg$e27 = peg$otherExpectation("HTTP/HTTPS host");
266
+ var peg$e28 = peg$literalExpectation(":", false);
267
+ var peg$e29 = peg$otherExpectation("identifier");
268
+ var peg$e30 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "-", "=", ",", "/", ":", "`", "\"", "'", "\\", "#", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
269
+ var peg$e31 = peg$literalExpectation("-", false);
270
+ var peg$e32 = peg$literalExpectation(">", false);
271
+ var peg$e33 = peg$otherExpectation("arguments with implicit parentheses");
272
+ var peg$e34 = peg$classExpectation([" ", "\t"], false, false);
273
+ var peg$e35 = peg$otherExpectation("integer");
274
+ var peg$e36 = peg$otherExpectation("lambda function");
275
+ var peg$e37 = peg$otherExpectation("path with a leading slash");
276
+ var peg$e38 = peg$literalExpectation("/", false);
277
+ var peg$e39 = peg$otherExpectation("list");
278
+ var peg$e40 = peg$literalExpectation("\n", false);
279
+ var peg$e41 = peg$literalExpectation("\r\n", false);
280
+ var peg$e42 = peg$literalExpectation("\r", false);
281
+ var peg$e43 = peg$otherExpectation("number");
282
+ var peg$e44 = peg$otherExpectation("object literal");
283
+ var peg$e45 = peg$literalExpectation("{", false);
284
+ var peg$e46 = peg$otherExpectation("object property");
285
+ var peg$e47 = peg$otherExpectation("function arguments in parentheses");
286
+ var peg$e48 = peg$otherExpectation("slash-separated path");
287
+ var peg$e49 = peg$otherExpectation("path element");
288
+ var peg$e50 = peg$otherExpectation("function call using protocol: syntax");
289
+ var peg$e51 = peg$otherExpectation("protocol");
290
+ var peg$e52 = peg$otherExpectation("reserved protocol");
291
+ var peg$e53 = peg$literalExpectation("https", false);
292
+ var peg$e54 = peg$literalExpectation("http", false);
293
+ var peg$e55 = peg$literalExpectation("package", false);
294
+ var peg$e56 = peg$literalExpectation("treehttps", false);
295
+ var peg$e57 = peg$literalExpectation("treehttp", false);
296
+ var peg$e58 = peg$literalExpectation("tree", false);
297
+ var peg$e59 = peg$otherExpectation("scope reference");
298
+ var peg$e60 = peg$literalExpectation(",", false);
299
+ var peg$e61 = peg$classExpectation(["+", "-"], false, false);
300
+ var peg$e62 = peg$literalExpectation("\u2192", false);
301
+ var peg$e63 = peg$literalExpectation("->", false);
302
+ var peg$e64 = peg$otherExpectation("single quote string");
303
+ var peg$e65 = peg$literalExpectation("'", false);
304
+ var peg$e66 = peg$otherExpectation("string");
305
+ var peg$e67 = peg$otherExpectation("template");
306
+ var peg$e68 = peg$literalExpectation("{{", false);
307
+ var peg$e69 = peg$otherExpectation("template text");
308
+ var peg$e70 = peg$otherExpectation("template literal");
309
+ var peg$e71 = peg$literalExpectation("`", false);
310
+ var peg$e72 = peg$otherExpectation("template substitution");
311
+ var peg$e73 = peg$literalExpectation("}}", false);
312
+ var peg$e74 = peg$otherExpectation("tree literal");
292
313
 
293
314
  var peg$f0 = function() { return ""; };
294
- var peg$f1 = function(path) { return [[ops.filesRoot], ...path]; };
295
- var peg$f2 = function(parts) { return parts; };
296
- var peg$f3 = function(key) { return [key, [ops.inherited, key]]; };
297
- var peg$f4 = function(list) { return [ops.array, ...(list ?? [])]; };
298
- var peg$f5 = function(chars) { return chars.join(""); };
299
- var peg$f6 = function() {
300
- return parseFloat(text());
315
+ var peg$f1 = function(path) {
316
+ return annotate([[ops.filesRoot], ...path], location());
317
+ };
318
+ var peg$f2 = function(path) {
319
+ return annotate([ops.traverse, ...path], location());
320
+ };
321
+ var peg$f3 = function(list) {
322
+ return annotate([ops.array, ...(list ?? [])], location());
301
323
  };
302
- var peg$f7 = function(target, chain) { return makeFunctionCall(target, chain); };
324
+ var peg$f4 = function(key) {
325
+ return annotate([key, [ops.inherited, key]], location());
326
+ };
327
+ var peg$f5 = function() {
328
+ error("Expected right curly brace");
329
+ };
330
+ var peg$f6 = function() {
331
+ error("Expected right bracket");
332
+ };
333
+ var peg$f7 = function() {
334
+ error("Expected right parenthesis");
335
+ };
303
336
  var peg$f8 = function(chars) { return chars.join(""); };
304
- var peg$f9 = function(target, args) {
305
- return [target, ...args];
337
+ var peg$f9 = function() {
338
+ return parseFloat(text());
306
339
  };
307
- var peg$f10 = function() { return text(); };
308
- var peg$f11 = function() {
340
+ var peg$f10 = function(target, chain, end) {
341
+ if (end) {
342
+ chain.push(end);
343
+ }
344
+ return annotate(makeFunctionCall(target, chain), location());
345
+ };
346
+ var peg$f11 = function() { return text(); };
347
+ var peg$f12 = function(chars) { return chars.join(""); };
348
+ var peg$f13 = function() {
309
349
  return parseInt(text());
310
350
  };
311
- var peg$f12 = function(expr) { return [ops.lambda, expr]; };
312
- var peg$f13 = function() { return [""]; };
313
- var peg$f14 = function(head, tail) { return [head].concat(tail); };
314
- var peg$f15 = function(properties) { return [ops.object, ...(properties ?? [])]; };
315
- var peg$f16 = function(head, tail) {
316
- return [head].concat(tail);
351
+ var peg$f14 = function(expr) {
352
+ return annotate([ops.lambda, null, expr], location());
353
+ };
354
+ var peg$f15 = function() { return annotate([""], location()); };
355
+ var peg$f16 = function(properties) {
356
+ return annotate([ops.object, ...(properties ?? [])], location());
357
+ };
358
+ var peg$f17 = function(key) {
359
+ return annotate([key, [ops.scope, key]], location());
360
+ };
361
+ var peg$f18 = function(parameters, expr) {
362
+ return annotate([ops.lambda, parameters ?? [], expr], location());
363
+ };
364
+ var peg$f19 = function(list) {
365
+ return list ?? annotate([undefined], location());
366
+ };
367
+ var peg$f20 = function(steps) {
368
+ return annotate(makePipeline(steps), location());
317
369
  };
318
- var peg$f17 = function(key) { return [key, [ops.scope, key]]; };
319
- var peg$f18 = function(list) { return list ?? [undefined]; };
320
- var peg$f19 = function(head, tail) { return [head].concat(tail); };
321
- var peg$f20 = function(key) { return [key]; };
322
370
  var peg$f21 = function(key) { return key.join(""); };
323
371
  var peg$f22 = function(protocol, host, path) {
324
- return [protocol, host, ...(path ?? [])];
372
+ return annotate([protocol, host, ...(path ?? [])], location());
325
373
  };
326
374
  var peg$f23 = function() { return ops.https; };
327
375
  var peg$f24 = function() { return ops.http; };
@@ -329,16 +377,23 @@ function peg$parse(input, options) {
329
377
  var peg$f26 = function() { return ops.treeHttps; };
330
378
  var peg$f27 = function() { return ops.treeHttp; };
331
379
  var peg$f28 = function() { return ops.treeHttps; };
332
- var peg$f29 = function(key) { return [ops.scope, key]; };
380
+ var peg$f29 = function(key) {
381
+ return annotate([ops.scope, key], location());
382
+ };
333
383
  var peg$f30 = function(chars) { return chars.join(""); };
334
- var peg$f31 = function(contents) { return [ops.lambda, contents]; };
335
- var peg$f32 = function(parts) { return makeTemplate(parts); };
384
+ var peg$f31 = function(contents) {
385
+ return annotate([ops.lambda, null, contents], location());
386
+ };
387
+ var peg$f32 = function(parts) {
388
+ return annotate(makeTemplate(parts), location());
389
+ };
336
390
  var peg$f33 = function(chars) { return chars.join(""); };
337
- var peg$f34 = function(parts) { return makeTemplate(parts); };
391
+ var peg$f34 = function(parts) {
392
+ return annotate(makeTemplate(parts), location());
393
+ };
338
394
  var peg$f35 = function(chars) { return chars.join(""); };
339
- var peg$f36 = function(assignments) { return [ops.tree, ...(assignments ?? [])]; };
340
- var peg$f37 = function(head, tail) {
341
- return [head].concat(tail);
395
+ var peg$f36 = function(assignments) {
396
+ return annotate([ops.tree, ...(assignments ?? [])], location());
342
397
  };
343
398
  var peg$currPos = 0;
344
399
  var peg$savedPos = 0;
@@ -549,36 +604,64 @@ function peg$parse(input, options) {
549
604
  return s0;
550
605
  }
551
606
 
552
- function peg$parseargsChain() {
553
- var s0, s1, s2;
607
+ function peg$parseargs() {
608
+ var s0, s1;
554
609
 
555
610
  peg$silentFails++;
556
- s0 = peg$currPos;
557
- s1 = [];
558
- s2 = peg$parseparensArgs();
559
- if (s2 === peg$FAILED) {
560
- s2 = peg$parseleadingSlashPath();
561
- }
562
- if (s2 !== peg$FAILED) {
563
- while (s2 !== peg$FAILED) {
564
- s1.push(s2);
565
- s2 = peg$parseparensArgs();
566
- if (s2 === peg$FAILED) {
567
- s2 = peg$parseleadingSlashPath();
568
- }
611
+ s0 = peg$parseparensArgs();
612
+ if (s0 === peg$FAILED) {
613
+ s0 = peg$currPos;
614
+ s1 = peg$parseleadingSlashPath();
615
+ if (s1 !== peg$FAILED) {
616
+ peg$savedPos = s0;
617
+ s1 = peg$f2(s1);
569
618
  }
619
+ s0 = s1;
620
+ }
621
+ peg$silentFails--;
622
+ if (s0 === peg$FAILED) {
623
+ s1 = peg$FAILED;
624
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
625
+ }
626
+
627
+ return s0;
628
+ }
629
+
630
+ function peg$parsearray() {
631
+ var s0, s1, s2, s3, s4, s5;
632
+
633
+ peg$silentFails++;
634
+ s0 = peg$currPos;
635
+ if (input.charCodeAt(peg$currPos) === 91) {
636
+ s1 = peg$c0;
637
+ peg$currPos++;
570
638
  } else {
571
639
  s1 = peg$FAILED;
640
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
572
641
  }
573
642
  if (s1 !== peg$FAILED) {
574
- peg$savedPos = s0;
575
- s1 = peg$f2(s1);
643
+ s2 = peg$parse__();
644
+ s3 = peg$parselist();
645
+ if (s3 === peg$FAILED) {
646
+ s3 = null;
647
+ }
648
+ s4 = peg$parse__();
649
+ s5 = peg$parseclosingBracket();
650
+ if (s5 !== peg$FAILED) {
651
+ peg$savedPos = s0;
652
+ s0 = peg$f3(s3);
653
+ } else {
654
+ peg$currPos = s0;
655
+ s0 = peg$FAILED;
656
+ }
657
+ } else {
658
+ peg$currPos = s0;
659
+ s0 = peg$FAILED;
576
660
  }
577
- s0 = s1;
578
661
  peg$silentFails--;
579
662
  if (s0 === peg$FAILED) {
580
663
  s1 = peg$FAILED;
581
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
664
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
582
665
  }
583
666
 
584
667
  return s0;
@@ -593,15 +676,15 @@ function peg$parse(input, options) {
593
676
  if (s1 !== peg$FAILED) {
594
677
  s2 = peg$parse__();
595
678
  if (input.charCodeAt(peg$currPos) === 61) {
596
- s3 = peg$c0;
679
+ s3 = peg$c1;
597
680
  peg$currPos++;
598
681
  } else {
599
682
  s3 = peg$FAILED;
600
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
683
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
601
684
  }
602
685
  if (s3 !== peg$FAILED) {
603
686
  s4 = peg$parse__();
604
- s5 = peg$parseexpr();
687
+ s5 = peg$parsepipeline();
605
688
  if (s5 !== peg$FAILED) {
606
689
  s0 = [ s1, s5 ];
607
690
  } else {
@@ -619,7 +702,7 @@ function peg$parse(input, options) {
619
702
  peg$silentFails--;
620
703
  if (s0 === peg$FAILED) {
621
704
  s1 = peg$FAILED;
622
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
705
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
623
706
  }
624
707
 
625
708
  return s0;
@@ -634,7 +717,7 @@ function peg$parse(input, options) {
634
717
  s1 = peg$parseidentifier();
635
718
  if (s1 !== peg$FAILED) {
636
719
  peg$savedPos = s0;
637
- s1 = peg$f3(s1);
720
+ s1 = peg$f4(s1);
638
721
  }
639
722
  s0 = s1;
640
723
  }
@@ -642,51 +725,6 @@ function peg$parse(input, options) {
642
725
  return s0;
643
726
  }
644
727
 
645
- function peg$parsearray() {
646
- var s0, s1, s2, s3, s4;
647
-
648
- peg$silentFails++;
649
- s0 = peg$currPos;
650
- if (input.charCodeAt(peg$currPos) === 91) {
651
- s1 = peg$c1;
652
- peg$currPos++;
653
- } else {
654
- s1 = peg$FAILED;
655
- if (peg$silentFails === 0) { peg$fail(peg$e5); }
656
- }
657
- if (s1 !== peg$FAILED) {
658
- s2 = peg$parse__();
659
- s3 = peg$parselist();
660
- if (s3 === peg$FAILED) {
661
- s3 = null;
662
- }
663
- if (input.charCodeAt(peg$currPos) === 93) {
664
- s4 = peg$c2;
665
- peg$currPos++;
666
- } else {
667
- s4 = peg$FAILED;
668
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
669
- }
670
- if (s4 !== peg$FAILED) {
671
- peg$savedPos = s0;
672
- s0 = peg$f4(s3);
673
- } else {
674
- peg$currPos = s0;
675
- s0 = peg$FAILED;
676
- }
677
- } else {
678
- peg$currPos = s0;
679
- s0 = peg$FAILED;
680
- }
681
- peg$silentFails--;
682
- if (s0 === peg$FAILED) {
683
- s1 = peg$FAILED;
684
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
685
- }
686
-
687
- return s0;
688
- }
689
-
690
728
  function peg$parsecallTarget() {
691
729
  var s0, s1;
692
730
 
@@ -701,11 +739,14 @@ function peg$parse(input, options) {
701
739
  if (s0 === peg$FAILED) {
702
740
  s0 = peg$parselambda();
703
741
  if (s0 === peg$FAILED) {
704
- s0 = peg$parseprotocolCall();
742
+ s0 = peg$parseparameterizedLambda();
705
743
  if (s0 === peg$FAILED) {
706
- s0 = peg$parsegroup();
744
+ s0 = peg$parseprotocolCall();
707
745
  if (s0 === peg$FAILED) {
708
- s0 = peg$parsescopeReference();
746
+ s0 = peg$parsegroup();
747
+ if (s0 === peg$FAILED) {
748
+ s0 = peg$parsescopeReference();
749
+ }
709
750
  }
710
751
  }
711
752
  }
@@ -716,8 +757,98 @@ function peg$parse(input, options) {
716
757
  peg$silentFails--;
717
758
  if (s0 === peg$FAILED) {
718
759
  s1 = peg$FAILED;
760
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
761
+ }
762
+
763
+ return s0;
764
+ }
765
+
766
+ function peg$parseclosingBrace() {
767
+ var s0, s1;
768
+
769
+ if (input.charCodeAt(peg$currPos) === 125) {
770
+ s0 = peg$c2;
771
+ peg$currPos++;
772
+ } else {
773
+ s0 = peg$FAILED;
719
774
  if (peg$silentFails === 0) { peg$fail(peg$e7); }
720
775
  }
776
+ if (s0 === peg$FAILED) {
777
+ s0 = peg$currPos;
778
+ if (input.length > peg$currPos) {
779
+ s1 = input.charAt(peg$currPos);
780
+ peg$currPos++;
781
+ } else {
782
+ s1 = peg$FAILED;
783
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
784
+ }
785
+ if (s1 === peg$FAILED) {
786
+ s1 = null;
787
+ }
788
+ peg$savedPos = s0;
789
+ s1 = peg$f5();
790
+ s0 = s1;
791
+ }
792
+
793
+ return s0;
794
+ }
795
+
796
+ function peg$parseclosingBracket() {
797
+ var s0, s1;
798
+
799
+ if (input.charCodeAt(peg$currPos) === 93) {
800
+ s0 = peg$c3;
801
+ peg$currPos++;
802
+ } else {
803
+ s0 = peg$FAILED;
804
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
805
+ }
806
+ if (s0 === peg$FAILED) {
807
+ s0 = peg$currPos;
808
+ if (input.length > peg$currPos) {
809
+ s1 = input.charAt(peg$currPos);
810
+ peg$currPos++;
811
+ } else {
812
+ s1 = peg$FAILED;
813
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
814
+ }
815
+ if (s1 === peg$FAILED) {
816
+ s1 = null;
817
+ }
818
+ peg$savedPos = s0;
819
+ s1 = peg$f6();
820
+ s0 = s1;
821
+ }
822
+
823
+ return s0;
824
+ }
825
+
826
+ function peg$parseclosingParen() {
827
+ var s0, s1;
828
+
829
+ if (input.charCodeAt(peg$currPos) === 41) {
830
+ s0 = peg$c4;
831
+ peg$currPos++;
832
+ } else {
833
+ s0 = peg$FAILED;
834
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
835
+ }
836
+ if (s0 === peg$FAILED) {
837
+ s0 = peg$currPos;
838
+ if (input.length > peg$currPos) {
839
+ s1 = input.charAt(peg$currPos);
840
+ peg$currPos++;
841
+ } else {
842
+ s1 = peg$FAILED;
843
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
844
+ }
845
+ if (s1 === peg$FAILED) {
846
+ s1 = null;
847
+ }
848
+ peg$savedPos = s0;
849
+ s1 = peg$f7();
850
+ s0 = s1;
851
+ }
721
852
 
722
853
  return s0;
723
854
  }
@@ -728,11 +859,11 @@ function peg$parse(input, options) {
728
859
  peg$silentFails++;
729
860
  s0 = peg$currPos;
730
861
  if (input.charCodeAt(peg$currPos) === 35) {
731
- s1 = peg$c3;
862
+ s1 = peg$c5;
732
863
  peg$currPos++;
733
864
  } else {
734
865
  s1 = peg$FAILED;
735
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
866
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
736
867
  }
737
868
  if (s1 !== peg$FAILED) {
738
869
  s2 = [];
@@ -741,7 +872,7 @@ function peg$parse(input, options) {
741
872
  peg$currPos++;
742
873
  } else {
743
874
  s3 = peg$FAILED;
744
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
875
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
745
876
  }
746
877
  while (s3 !== peg$FAILED) {
747
878
  s2.push(s3);
@@ -750,7 +881,7 @@ function peg$parse(input, options) {
750
881
  peg$currPos++;
751
882
  } else {
752
883
  s3 = peg$FAILED;
753
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
884
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
754
885
  }
755
886
  }
756
887
  s1 = [s1, s2];
@@ -762,7 +893,7 @@ function peg$parse(input, options) {
762
893
  peg$silentFails--;
763
894
  if (s0 === peg$FAILED) {
764
895
  s1 = peg$FAILED;
765
- if (peg$silentFails === 0) { peg$fail(peg$e8); }
896
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
766
897
  }
767
898
 
768
899
  return s0;
@@ -778,7 +909,7 @@ function peg$parse(input, options) {
778
909
  peg$currPos++;
779
910
  } else {
780
911
  s2 = peg$FAILED;
781
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
912
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
782
913
  }
783
914
  if (s2 !== peg$FAILED) {
784
915
  while (s2 !== peg$FAILED) {
@@ -788,7 +919,7 @@ function peg$parse(input, options) {
788
919
  peg$currPos++;
789
920
  } else {
790
921
  s2 = peg$FAILED;
791
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
922
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
792
923
  }
793
924
  }
794
925
  } else {
@@ -804,17 +935,40 @@ function peg$parse(input, options) {
804
935
  return s0;
805
936
  }
806
937
 
938
+ function peg$parsedoubleArrow() {
939
+ var s0;
940
+
941
+ if (input.charCodeAt(peg$currPos) === 8658) {
942
+ s0 = peg$c6;
943
+ peg$currPos++;
944
+ } else {
945
+ s0 = peg$FAILED;
946
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
947
+ }
948
+ if (s0 === peg$FAILED) {
949
+ if (input.substr(peg$currPos, 2) === peg$c7) {
950
+ s0 = peg$c7;
951
+ peg$currPos += 2;
952
+ } else {
953
+ s0 = peg$FAILED;
954
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
955
+ }
956
+ }
957
+
958
+ return s0;
959
+ }
960
+
807
961
  function peg$parsedoubleQuoteString() {
808
962
  var s0, s1, s2, s3;
809
963
 
810
964
  peg$silentFails++;
811
965
  s0 = peg$currPos;
812
966
  if (input.charCodeAt(peg$currPos) === 34) {
813
- s1 = peg$c4;
967
+ s1 = peg$c8;
814
968
  peg$currPos++;
815
969
  } else {
816
970
  s1 = peg$FAILED;
817
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
971
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
818
972
  }
819
973
  if (s1 !== peg$FAILED) {
820
974
  s2 = [];
@@ -824,15 +978,15 @@ function peg$parse(input, options) {
824
978
  s3 = peg$parsedoubleQuoteStringChar();
825
979
  }
826
980
  if (input.charCodeAt(peg$currPos) === 34) {
827
- s3 = peg$c4;
981
+ s3 = peg$c8;
828
982
  peg$currPos++;
829
983
  } else {
830
984
  s3 = peg$FAILED;
831
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
985
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
832
986
  }
833
987
  if (s3 !== peg$FAILED) {
834
988
  peg$savedPos = s0;
835
- s0 = peg$f5(s2);
989
+ s0 = peg$f8(s2);
836
990
  } else {
837
991
  peg$currPos = s0;
838
992
  s0 = peg$FAILED;
@@ -844,7 +998,7 @@ function peg$parse(input, options) {
844
998
  peg$silentFails--;
845
999
  if (s0 === peg$FAILED) {
846
1000
  s1 = peg$FAILED;
847
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1001
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
848
1002
  }
849
1003
 
850
1004
  return s0;
@@ -857,11 +1011,11 @@ function peg$parse(input, options) {
857
1011
  s1 = peg$currPos;
858
1012
  peg$silentFails++;
859
1013
  if (input.charCodeAt(peg$currPos) === 34) {
860
- s2 = peg$c4;
1014
+ s2 = peg$c8;
861
1015
  peg$currPos++;
862
1016
  } else {
863
1017
  s2 = peg$FAILED;
864
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
1018
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
865
1019
  }
866
1020
  if (s2 === peg$FAILED) {
867
1021
  s2 = peg$parsenewLine();
@@ -895,11 +1049,11 @@ function peg$parse(input, options) {
895
1049
  peg$silentFails++;
896
1050
  s0 = peg$currPos;
897
1051
  if (input.charCodeAt(peg$currPos) === 92) {
898
- s1 = peg$c5;
1052
+ s1 = peg$c9;
899
1053
  peg$currPos++;
900
1054
  } else {
901
1055
  s1 = peg$FAILED;
902
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1056
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
903
1057
  }
904
1058
  if (s1 !== peg$FAILED) {
905
1059
  if (input.length > peg$currPos) {
@@ -907,7 +1061,7 @@ function peg$parse(input, options) {
907
1061
  peg$currPos++;
908
1062
  } else {
909
1063
  s2 = peg$FAILED;
910
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1064
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
911
1065
  }
912
1066
  if (s2 !== peg$FAILED) {
913
1067
  s0 = s2;
@@ -922,80 +1076,38 @@ function peg$parse(input, options) {
922
1076
  peg$silentFails--;
923
1077
  if (s0 === peg$FAILED) {
924
1078
  s1 = peg$FAILED;
925
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1079
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
926
1080
  }
927
1081
 
928
1082
  return s0;
929
1083
  }
930
1084
 
931
1085
  function peg$parseexpr() {
932
- var s0, s1;
1086
+ var s0;
1087
+
1088
+ s0 = peg$parsepipeline();
1089
+
1090
+ return s0;
1091
+ }
1092
+
1093
+ function peg$parseexpression() {
1094
+ var s0, s1, s2, s3;
933
1095
 
934
1096
  peg$silentFails++;
935
- s0 = peg$parseimplicitParensCall();
936
- if (s0 === peg$FAILED) {
937
- s0 = peg$parsefunctionComposition();
938
- if (s0 === peg$FAILED) {
939
- s0 = peg$parseabsoluteFilePath();
940
- if (s0 === peg$FAILED) {
941
- s0 = peg$parsearray();
942
- if (s0 === peg$FAILED) {
943
- s0 = peg$parseobject();
944
- if (s0 === peg$FAILED) {
945
- s0 = peg$parsetree();
946
- if (s0 === peg$FAILED) {
947
- s0 = peg$parselambda();
948
- if (s0 === peg$FAILED) {
949
- s0 = peg$parsetemplateLiteral();
950
- if (s0 === peg$FAILED) {
951
- s0 = peg$parsegroup();
952
- if (s0 === peg$FAILED) {
953
- s0 = peg$parsestring();
954
- if (s0 === peg$FAILED) {
955
- s0 = peg$parsenumber();
956
- if (s0 === peg$FAILED) {
957
- s0 = peg$parseprotocolCall();
958
- if (s0 === peg$FAILED) {
959
- s0 = peg$parsescopeReference();
960
- }
961
- }
962
- }
963
- }
964
- }
965
- }
966
- }
967
- }
968
- }
969
- }
970
- }
971
- }
972
- peg$silentFails--;
1097
+ s0 = peg$currPos;
1098
+ s1 = peg$parse__();
1099
+ s2 = peg$parsepipeline();
1100
+ if (s2 !== peg$FAILED) {
1101
+ s3 = peg$parse__();
1102
+ s0 = s2;
1103
+ } else {
1104
+ peg$currPos = s0;
1105
+ s0 = peg$FAILED;
1106
+ }
1107
+ peg$silentFails--;
973
1108
  if (s0 === peg$FAILED) {
974
1109
  s1 = peg$FAILED;
975
- if (peg$silentFails === 0) { peg$fail(peg$e17); }
976
- }
977
-
978
- return s0;
979
- }
980
-
981
- function peg$parseexpression() {
982
- var s0, s1, s2, s3;
983
-
984
- peg$silentFails++;
985
- s0 = peg$currPos;
986
- s1 = peg$parse__();
987
- s2 = peg$parseexpr();
988
- if (s2 !== peg$FAILED) {
989
- s3 = peg$parse__();
990
- s0 = s2;
991
- } else {
992
- peg$currPos = s0;
993
- s0 = peg$FAILED;
994
- }
995
- peg$silentFails--;
996
- if (s0 === peg$FAILED) {
997
- s1 = peg$FAILED;
998
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
1110
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
999
1111
  }
1000
1112
 
1001
1113
  return s0;
@@ -1015,17 +1127,17 @@ function peg$parse(input, options) {
1015
1127
  s2 = null;
1016
1128
  }
1017
1129
  if (input.charCodeAt(peg$currPos) === 46) {
1018
- s3 = peg$c6;
1130
+ s3 = peg$c10;
1019
1131
  peg$currPos++;
1020
1132
  } else {
1021
1133
  s3 = peg$FAILED;
1022
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1134
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1023
1135
  }
1024
1136
  if (s3 !== peg$FAILED) {
1025
1137
  s4 = peg$parsedigits();
1026
1138
  if (s4 !== peg$FAILED) {
1027
1139
  peg$savedPos = s0;
1028
- s0 = peg$f6();
1140
+ s0 = peg$f9();
1029
1141
  } else {
1030
1142
  peg$currPos = s0;
1031
1143
  s0 = peg$FAILED;
@@ -1037,27 +1149,31 @@ function peg$parse(input, options) {
1037
1149
  peg$silentFails--;
1038
1150
  if (s0 === peg$FAILED) {
1039
1151
  s1 = peg$FAILED;
1040
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
1152
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1041
1153
  }
1042
1154
 
1043
1155
  return s0;
1044
1156
  }
1045
1157
 
1046
1158
  function peg$parsefunctionComposition() {
1047
- var s0, s1, s2;
1159
+ var s0, s1, s2, s3;
1048
1160
 
1049
1161
  peg$silentFails++;
1050
1162
  s0 = peg$currPos;
1051
1163
  s1 = peg$parsecallTarget();
1052
1164
  if (s1 !== peg$FAILED) {
1053
- s2 = peg$parseargsChain();
1054
- if (s2 !== peg$FAILED) {
1055
- peg$savedPos = s0;
1056
- s0 = peg$f7(s1, s2);
1057
- } else {
1058
- peg$currPos = s0;
1059
- s0 = peg$FAILED;
1165
+ s2 = [];
1166
+ s3 = peg$parseargs();
1167
+ while (s3 !== peg$FAILED) {
1168
+ s2.push(s3);
1169
+ s3 = peg$parseargs();
1170
+ }
1171
+ s3 = peg$parseimplicitParensArgs();
1172
+ if (s3 === peg$FAILED) {
1173
+ s3 = null;
1060
1174
  }
1175
+ peg$savedPos = s0;
1176
+ s0 = peg$f10(s1, s2, s3);
1061
1177
  } else {
1062
1178
  peg$currPos = s0;
1063
1179
  s0 = peg$FAILED;
@@ -1065,7 +1181,7 @@ function peg$parse(input, options) {
1065
1181
  peg$silentFails--;
1066
1182
  if (s0 === peg$FAILED) {
1067
1183
  s1 = peg$FAILED;
1068
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
1184
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1069
1185
  }
1070
1186
 
1071
1187
  return s0;
@@ -1077,24 +1193,18 @@ function peg$parse(input, options) {
1077
1193
  peg$silentFails++;
1078
1194
  s0 = peg$currPos;
1079
1195
  if (input.charCodeAt(peg$currPos) === 40) {
1080
- s1 = peg$c7;
1196
+ s1 = peg$c11;
1081
1197
  peg$currPos++;
1082
1198
  } else {
1083
1199
  s1 = peg$FAILED;
1084
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1200
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1085
1201
  }
1086
1202
  if (s1 !== peg$FAILED) {
1087
1203
  s2 = peg$parse__();
1088
- s3 = peg$parseexpr();
1204
+ s3 = peg$parsepipeline();
1089
1205
  if (s3 !== peg$FAILED) {
1090
1206
  s4 = peg$parse__();
1091
- if (input.charCodeAt(peg$currPos) === 41) {
1092
- s5 = peg$c8;
1093
- peg$currPos++;
1094
- } else {
1095
- s5 = peg$FAILED;
1096
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
1097
- }
1207
+ s5 = peg$parseclosingParen();
1098
1208
  if (s5 !== peg$FAILED) {
1099
1209
  s0 = s3;
1100
1210
  } else {
@@ -1112,7 +1222,53 @@ function peg$parse(input, options) {
1112
1222
  peg$silentFails--;
1113
1223
  if (s0 === peg$FAILED) {
1114
1224
  s1 = peg$FAILED;
1115
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
1225
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1226
+ }
1227
+
1228
+ return s0;
1229
+ }
1230
+
1231
+ function peg$parsehost() {
1232
+ var s0, s1, s2, s3, s4;
1233
+
1234
+ peg$silentFails++;
1235
+ s0 = peg$currPos;
1236
+ s1 = peg$parseidentifier();
1237
+ if (s1 !== peg$FAILED) {
1238
+ s2 = peg$currPos;
1239
+ if (input.charCodeAt(peg$currPos) === 58) {
1240
+ s3 = peg$c12;
1241
+ peg$currPos++;
1242
+ } else {
1243
+ s3 = peg$FAILED;
1244
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1245
+ }
1246
+ if (s3 !== peg$FAILED) {
1247
+ s4 = peg$parsenumber();
1248
+ if (s4 !== peg$FAILED) {
1249
+ s3 = [s3, s4];
1250
+ s2 = s3;
1251
+ } else {
1252
+ peg$currPos = s2;
1253
+ s2 = peg$FAILED;
1254
+ }
1255
+ } else {
1256
+ peg$currPos = s2;
1257
+ s2 = peg$FAILED;
1258
+ }
1259
+ if (s2 === peg$FAILED) {
1260
+ s2 = null;
1261
+ }
1262
+ peg$savedPos = s0;
1263
+ s0 = peg$f11();
1264
+ } else {
1265
+ peg$currPos = s0;
1266
+ s0 = peg$FAILED;
1267
+ }
1268
+ peg$silentFails--;
1269
+ if (s0 === peg$FAILED) {
1270
+ s1 = peg$FAILED;
1271
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1116
1272
  }
1117
1273
 
1118
1274
  return s0;
@@ -1135,60 +1291,56 @@ function peg$parse(input, options) {
1135
1291
  }
1136
1292
  if (s1 !== peg$FAILED) {
1137
1293
  peg$savedPos = s0;
1138
- s1 = peg$f8(s1);
1294
+ s1 = peg$f12(s1);
1139
1295
  }
1140
1296
  s0 = s1;
1141
1297
  peg$silentFails--;
1142
1298
  if (s0 === peg$FAILED) {
1143
1299
  s1 = peg$FAILED;
1144
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
1300
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1145
1301
  }
1146
1302
 
1147
1303
  return s0;
1148
1304
  }
1149
1305
 
1150
1306
  function peg$parseidentifierChar() {
1151
- var s0;
1307
+ var s0, s1, s2, s3;
1152
1308
 
1153
1309
  if (peg$r2.test(input.charAt(peg$currPos))) {
1154
1310
  s0 = input.charAt(peg$currPos);
1155
1311
  peg$currPos++;
1156
1312
  } else {
1157
1313
  s0 = peg$FAILED;
1158
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
1314
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1159
1315
  }
1160
1316
  if (s0 === peg$FAILED) {
1161
- s0 = peg$parseescapedChar();
1162
- }
1163
-
1164
- return s0;
1165
- }
1166
-
1167
- function peg$parseimplicitParensCall() {
1168
- var s0, s1, s2, s3;
1169
-
1170
- peg$silentFails++;
1171
- s0 = peg$currPos;
1172
- s1 = peg$parsefunctionComposition();
1173
- if (s1 === peg$FAILED) {
1174
- s1 = peg$parsecallTarget();
1175
- }
1176
- if (s1 !== peg$FAILED) {
1177
- s2 = [];
1178
- s3 = peg$parseinlineSpace();
1179
- if (s3 !== peg$FAILED) {
1180
- while (s3 !== peg$FAILED) {
1181
- s2.push(s3);
1182
- s3 = peg$parseinlineSpace();
1183
- }
1317
+ s0 = peg$currPos;
1318
+ if (input.charCodeAt(peg$currPos) === 45) {
1319
+ s1 = peg$c13;
1320
+ peg$currPos++;
1184
1321
  } else {
1185
- s2 = peg$FAILED;
1322
+ s1 = peg$FAILED;
1323
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1186
1324
  }
1187
- if (s2 !== peg$FAILED) {
1188
- s3 = peg$parselist();
1189
- if (s3 !== peg$FAILED) {
1190
- peg$savedPos = s0;
1191
- s0 = peg$f9(s1, s3);
1325
+ if (s1 !== peg$FAILED) {
1326
+ s2 = peg$currPos;
1327
+ peg$silentFails++;
1328
+ if (input.charCodeAt(peg$currPos) === 62) {
1329
+ s3 = peg$c14;
1330
+ peg$currPos++;
1331
+ } else {
1332
+ s3 = peg$FAILED;
1333
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1334
+ }
1335
+ peg$silentFails--;
1336
+ if (s3 === peg$FAILED) {
1337
+ s2 = undefined;
1338
+ } else {
1339
+ peg$currPos = s2;
1340
+ s2 = peg$FAILED;
1341
+ }
1342
+ if (s2 !== peg$FAILED) {
1343
+ s0 = s1;
1192
1344
  } else {
1193
1345
  peg$currPos = s0;
1194
1346
  s0 = peg$FAILED;
@@ -1197,52 +1349,80 @@ function peg$parse(input, options) {
1197
1349
  peg$currPos = s0;
1198
1350
  s0 = peg$FAILED;
1199
1351
  }
1200
- } else {
1201
- peg$currPos = s0;
1202
- s0 = peg$FAILED;
1203
- }
1204
- peg$silentFails--;
1205
- if (s0 === peg$FAILED) {
1206
- s1 = peg$FAILED;
1207
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
1352
+ if (s0 === peg$FAILED) {
1353
+ s0 = peg$parseescapedChar();
1354
+ }
1208
1355
  }
1209
1356
 
1210
1357
  return s0;
1211
1358
  }
1212
1359
 
1213
- function peg$parsehost() {
1360
+ function peg$parseidentifierList() {
1214
1361
  var s0, s1, s2, s3, s4;
1215
1362
 
1216
- peg$silentFails++;
1217
1363
  s0 = peg$currPos;
1218
- s1 = peg$parseidentifier();
1219
- if (s1 !== peg$FAILED) {
1220
- s2 = peg$currPos;
1221
- if (input.charCodeAt(peg$currPos) === 58) {
1222
- s3 = peg$c9;
1223
- peg$currPos++;
1224
- } else {
1225
- s3 = peg$FAILED;
1226
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1227
- }
1228
- if (s3 !== peg$FAILED) {
1229
- s4 = peg$parsenumber();
1230
- if (s4 !== peg$FAILED) {
1231
- s3 = [s3, s4];
1232
- s2 = s3;
1364
+ s1 = peg$currPos;
1365
+ s2 = [];
1366
+ s3 = peg$parseidentifier();
1367
+ while (s3 !== peg$FAILED) {
1368
+ s2.push(s3);
1369
+ s3 = peg$currPos;
1370
+ s4 = peg$parseseparator();
1371
+ if (s4 !== peg$FAILED) {
1372
+ s4 = peg$parseidentifier();
1373
+ if (s4 === peg$FAILED) {
1374
+ peg$currPos = s3;
1375
+ s3 = peg$FAILED;
1233
1376
  } else {
1234
- peg$currPos = s2;
1235
- s2 = peg$FAILED;
1377
+ s3 = s4;
1236
1378
  }
1237
1379
  } else {
1238
- peg$currPos = s2;
1239
- s2 = peg$FAILED;
1380
+ s3 = s4;
1240
1381
  }
1382
+ }
1383
+ if (s2.length < 1) {
1384
+ peg$currPos = s1;
1385
+ s1 = peg$FAILED;
1386
+ } else {
1387
+ s1 = s2;
1388
+ }
1389
+ if (s1 !== peg$FAILED) {
1390
+ s2 = peg$parseseparator();
1241
1391
  if (s2 === peg$FAILED) {
1242
1392
  s2 = null;
1243
1393
  }
1244
- peg$savedPos = s0;
1245
- s0 = peg$f10();
1394
+ s0 = s1;
1395
+ } else {
1396
+ peg$currPos = s0;
1397
+ s0 = peg$FAILED;
1398
+ }
1399
+
1400
+ return s0;
1401
+ }
1402
+
1403
+ function peg$parseimplicitParensArgs() {
1404
+ var s0, s1, s2;
1405
+
1406
+ peg$silentFails++;
1407
+ s0 = peg$currPos;
1408
+ s1 = [];
1409
+ s2 = peg$parseinlineSpace();
1410
+ if (s2 !== peg$FAILED) {
1411
+ while (s2 !== peg$FAILED) {
1412
+ s1.push(s2);
1413
+ s2 = peg$parseinlineSpace();
1414
+ }
1415
+ } else {
1416
+ s1 = peg$FAILED;
1417
+ }
1418
+ if (s1 !== peg$FAILED) {
1419
+ s2 = peg$parselist();
1420
+ if (s2 !== peg$FAILED) {
1421
+ s0 = s2;
1422
+ } else {
1423
+ peg$currPos = s0;
1424
+ s0 = peg$FAILED;
1425
+ }
1246
1426
  } else {
1247
1427
  peg$currPos = s0;
1248
1428
  s0 = peg$FAILED;
@@ -1250,7 +1430,7 @@ function peg$parse(input, options) {
1250
1430
  peg$silentFails--;
1251
1431
  if (s0 === peg$FAILED) {
1252
1432
  s1 = peg$FAILED;
1253
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
1433
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1254
1434
  }
1255
1435
 
1256
1436
  return s0;
@@ -1264,7 +1444,7 @@ function peg$parse(input, options) {
1264
1444
  peg$currPos++;
1265
1445
  } else {
1266
1446
  s0 = peg$FAILED;
1267
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
1447
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1268
1448
  }
1269
1449
 
1270
1450
  return s0;
@@ -1282,7 +1462,7 @@ function peg$parse(input, options) {
1282
1462
  s2 = peg$parsedigits();
1283
1463
  if (s2 !== peg$FAILED) {
1284
1464
  peg$savedPos = s0;
1285
- s0 = peg$f11();
1465
+ s0 = peg$f13();
1286
1466
  } else {
1287
1467
  peg$currPos = s0;
1288
1468
  s0 = peg$FAILED;
@@ -1290,7 +1470,7 @@ function peg$parse(input, options) {
1290
1470
  peg$silentFails--;
1291
1471
  if (s0 === peg$FAILED) {
1292
1472
  s1 = peg$FAILED;
1293
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
1473
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1294
1474
  }
1295
1475
 
1296
1476
  return s0;
@@ -1302,18 +1482,18 @@ function peg$parse(input, options) {
1302
1482
  peg$silentFails++;
1303
1483
  s0 = peg$currPos;
1304
1484
  if (input.charCodeAt(peg$currPos) === 61) {
1305
- s1 = peg$c0;
1485
+ s1 = peg$c1;
1306
1486
  peg$currPos++;
1307
1487
  } else {
1308
1488
  s1 = peg$FAILED;
1309
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
1489
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
1310
1490
  }
1311
1491
  if (s1 !== peg$FAILED) {
1312
1492
  s2 = peg$parse__();
1313
- s3 = peg$parseexpr();
1493
+ s3 = peg$parsepipeline();
1314
1494
  if (s3 !== peg$FAILED) {
1315
1495
  peg$savedPos = s0;
1316
- s0 = peg$f12(s3);
1496
+ s0 = peg$f14(s3);
1317
1497
  } else {
1318
1498
  peg$currPos = s0;
1319
1499
  s0 = peg$FAILED;
@@ -1325,7 +1505,7 @@ function peg$parse(input, options) {
1325
1505
  peg$silentFails--;
1326
1506
  if (s0 === peg$FAILED) {
1327
1507
  s1 = peg$FAILED;
1328
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
1508
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
1329
1509
  }
1330
1510
 
1331
1511
  return s0;
@@ -1337,20 +1517,15 @@ function peg$parse(input, options) {
1337
1517
  peg$silentFails++;
1338
1518
  s0 = peg$currPos;
1339
1519
  if (input.charCodeAt(peg$currPos) === 47) {
1340
- s1 = peg$c10;
1520
+ s1 = peg$c15;
1341
1521
  peg$currPos++;
1342
1522
  } else {
1343
1523
  s1 = peg$FAILED;
1344
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1524
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1345
1525
  }
1346
1526
  if (s1 !== peg$FAILED) {
1347
1527
  s2 = peg$parsepath();
1348
- if (s2 !== peg$FAILED) {
1349
- s0 = s2;
1350
- } else {
1351
- peg$currPos = s0;
1352
- s0 = peg$FAILED;
1353
- }
1528
+ s0 = s2;
1354
1529
  } else {
1355
1530
  peg$currPos = s0;
1356
1531
  s0 = peg$FAILED;
@@ -1358,72 +1533,63 @@ function peg$parse(input, options) {
1358
1533
  if (s0 === peg$FAILED) {
1359
1534
  s0 = peg$currPos;
1360
1535
  if (input.charCodeAt(peg$currPos) === 47) {
1361
- s1 = peg$c10;
1536
+ s1 = peg$c15;
1362
1537
  peg$currPos++;
1363
1538
  } else {
1364
1539
  s1 = peg$FAILED;
1365
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1540
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1366
1541
  }
1367
1542
  if (s1 !== peg$FAILED) {
1368
1543
  peg$savedPos = s0;
1369
- s1 = peg$f13();
1544
+ s1 = peg$f15();
1370
1545
  }
1371
1546
  s0 = s1;
1372
1547
  }
1373
1548
  peg$silentFails--;
1374
1549
  if (s0 === peg$FAILED) {
1375
1550
  s1 = peg$FAILED;
1376
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
1551
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1377
1552
  }
1378
1553
 
1379
1554
  return s0;
1380
1555
  }
1381
1556
 
1382
1557
  function peg$parselist() {
1383
- var s0, s1, s2, s3, s4, s5;
1558
+ var s0, s1, s2, s3, s4;
1384
1559
 
1385
1560
  peg$silentFails++;
1386
1561
  s0 = peg$currPos;
1387
- s1 = peg$parseexpr();
1388
- if (s1 !== peg$FAILED) {
1389
- s2 = [];
1562
+ s1 = peg$currPos;
1563
+ s2 = [];
1564
+ s3 = peg$parsepipeline();
1565
+ while (s3 !== peg$FAILED) {
1566
+ s2.push(s3);
1390
1567
  s3 = peg$currPos;
1391
1568
  s4 = peg$parseseparator();
1392
1569
  if (s4 !== peg$FAILED) {
1393
- s5 = peg$parseexpr();
1394
- if (s5 !== peg$FAILED) {
1395
- s3 = s5;
1396
- } else {
1570
+ s4 = peg$parsepipeline();
1571
+ if (s4 === peg$FAILED) {
1397
1572
  peg$currPos = s3;
1398
1573
  s3 = peg$FAILED;
1399
- }
1400
- } else {
1401
- peg$currPos = s3;
1402
- s3 = peg$FAILED;
1403
- }
1404
- while (s3 !== peg$FAILED) {
1405
- s2.push(s3);
1406
- s3 = peg$currPos;
1407
- s4 = peg$parseseparator();
1408
- if (s4 !== peg$FAILED) {
1409
- s5 = peg$parseexpr();
1410
- if (s5 !== peg$FAILED) {
1411
- s3 = s5;
1412
- } else {
1413
- peg$currPos = s3;
1414
- s3 = peg$FAILED;
1415
- }
1416
1574
  } else {
1417
- peg$currPos = s3;
1418
- s3 = peg$FAILED;
1575
+ s3 = s4;
1419
1576
  }
1577
+ } else {
1578
+ s3 = s4;
1420
1579
  }
1421
- s3 = peg$parseseparator();
1422
- if (s3 === peg$FAILED) {
1423
- s3 = null;
1580
+ }
1581
+ if (s2.length < 1) {
1582
+ peg$currPos = s1;
1583
+ s1 = peg$FAILED;
1584
+ } else {
1585
+ s1 = s2;
1586
+ }
1587
+ if (s1 !== peg$FAILED) {
1588
+ s2 = peg$parseseparator();
1589
+ if (s2 === peg$FAILED) {
1590
+ s2 = null;
1424
1591
  }
1425
- peg$savedPos = s0;
1426
- s0 = peg$f14(s1, s2);
1592
+ s0 = s1;
1427
1593
  } else {
1428
1594
  peg$currPos = s0;
1429
1595
  s0 = peg$FAILED;
@@ -1431,7 +1597,7 @@ function peg$parse(input, options) {
1431
1597
  peg$silentFails--;
1432
1598
  if (s0 === peg$FAILED) {
1433
1599
  s1 = peg$FAILED;
1434
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1600
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
1435
1601
  }
1436
1602
 
1437
1603
  return s0;
@@ -1441,27 +1607,27 @@ function peg$parse(input, options) {
1441
1607
  var s0;
1442
1608
 
1443
1609
  if (input.charCodeAt(peg$currPos) === 10) {
1444
- s0 = peg$c11;
1610
+ s0 = peg$c16;
1445
1611
  peg$currPos++;
1446
1612
  } else {
1447
1613
  s0 = peg$FAILED;
1448
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
1614
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1449
1615
  }
1450
1616
  if (s0 === peg$FAILED) {
1451
- if (input.substr(peg$currPos, 2) === peg$c12) {
1452
- s0 = peg$c12;
1617
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1618
+ s0 = peg$c17;
1453
1619
  peg$currPos += 2;
1454
1620
  } else {
1455
1621
  s0 = peg$FAILED;
1456
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
1622
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
1457
1623
  }
1458
1624
  if (s0 === peg$FAILED) {
1459
1625
  if (input.charCodeAt(peg$currPos) === 13) {
1460
- s0 = peg$c13;
1626
+ s0 = peg$c18;
1461
1627
  peg$currPos++;
1462
1628
  } else {
1463
1629
  s0 = peg$FAILED;
1464
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
1630
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
1465
1631
  }
1466
1632
  }
1467
1633
  }
@@ -1480,23 +1646,23 @@ function peg$parse(input, options) {
1480
1646
  peg$silentFails--;
1481
1647
  if (s0 === peg$FAILED) {
1482
1648
  s1 = peg$FAILED;
1483
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
1649
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
1484
1650
  }
1485
1651
 
1486
1652
  return s0;
1487
1653
  }
1488
1654
 
1489
1655
  function peg$parseobject() {
1490
- var s0, s1, s2, s3, s4;
1656
+ var s0, s1, s2, s3, s4, s5;
1491
1657
 
1492
1658
  peg$silentFails++;
1493
1659
  s0 = peg$currPos;
1494
1660
  if (input.charCodeAt(peg$currPos) === 123) {
1495
- s1 = peg$c14;
1661
+ s1 = peg$c19;
1496
1662
  peg$currPos++;
1497
1663
  } else {
1498
1664
  s1 = peg$FAILED;
1499
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
1665
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
1500
1666
  }
1501
1667
  if (s1 !== peg$FAILED) {
1502
1668
  s2 = peg$parse__();
@@ -1504,16 +1670,17 @@ function peg$parse(input, options) {
1504
1670
  if (s3 === peg$FAILED) {
1505
1671
  s3 = null;
1506
1672
  }
1673
+ s4 = peg$parse__();
1507
1674
  if (input.charCodeAt(peg$currPos) === 125) {
1508
- s4 = peg$c15;
1675
+ s5 = peg$c2;
1509
1676
  peg$currPos++;
1510
1677
  } else {
1511
- s4 = peg$FAILED;
1512
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
1678
+ s5 = peg$FAILED;
1679
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
1513
1680
  }
1514
- if (s4 !== peg$FAILED) {
1681
+ if (s5 !== peg$FAILED) {
1515
1682
  peg$savedPos = s0;
1516
- s0 = peg$f15(s3);
1683
+ s0 = peg$f16(s3);
1517
1684
  } else {
1518
1685
  peg$currPos = s0;
1519
1686
  s0 = peg$FAILED;
@@ -1525,57 +1692,47 @@ function peg$parse(input, options) {
1525
1692
  peg$silentFails--;
1526
1693
  if (s0 === peg$FAILED) {
1527
1694
  s1 = peg$FAILED;
1528
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
1695
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
1529
1696
  }
1530
1697
 
1531
1698
  return s0;
1532
1699
  }
1533
1700
 
1534
1701
  function peg$parseobjectProperties() {
1535
- var s0, s1, s2, s3, s4, s5;
1702
+ var s0, s1, s2, s3, s4;
1536
1703
 
1537
1704
  s0 = peg$currPos;
1538
- s1 = peg$parseobjectPropertyOrShorthand();
1539
- if (s1 !== peg$FAILED) {
1540
- s2 = [];
1705
+ s1 = peg$currPos;
1706
+ s2 = [];
1707
+ s3 = peg$parseobjectPropertyOrShorthand();
1708
+ while (s3 !== peg$FAILED) {
1709
+ s2.push(s3);
1541
1710
  s3 = peg$currPos;
1542
1711
  s4 = peg$parseseparator();
1543
1712
  if (s4 !== peg$FAILED) {
1544
- s5 = peg$parseobjectPropertyOrShorthand();
1545
- if (s5 !== peg$FAILED) {
1546
- s3 = s5;
1547
- } else {
1713
+ s4 = peg$parseobjectPropertyOrShorthand();
1714
+ if (s4 === peg$FAILED) {
1548
1715
  peg$currPos = s3;
1549
1716
  s3 = peg$FAILED;
1550
- }
1551
- } else {
1552
- peg$currPos = s3;
1553
- s3 = peg$FAILED;
1554
- }
1555
- while (s3 !== peg$FAILED) {
1556
- s2.push(s3);
1557
- s3 = peg$currPos;
1558
- s4 = peg$parseseparator();
1559
- if (s4 !== peg$FAILED) {
1560
- s5 = peg$parseobjectPropertyOrShorthand();
1561
- if (s5 !== peg$FAILED) {
1562
- s3 = s5;
1563
- } else {
1564
- peg$currPos = s3;
1565
- s3 = peg$FAILED;
1566
- }
1567
1717
  } else {
1568
- peg$currPos = s3;
1569
- s3 = peg$FAILED;
1718
+ s3 = s4;
1570
1719
  }
1720
+ } else {
1721
+ s3 = s4;
1571
1722
  }
1572
- s3 = peg$parseseparator();
1573
- if (s3 === peg$FAILED) {
1574
- s3 = null;
1723
+ }
1724
+ if (s2.length < 1) {
1725
+ peg$currPos = s1;
1726
+ s1 = peg$FAILED;
1727
+ } else {
1728
+ s1 = s2;
1729
+ }
1730
+ if (s1 !== peg$FAILED) {
1731
+ s2 = peg$parseseparator();
1732
+ if (s2 === peg$FAILED) {
1733
+ s2 = null;
1575
1734
  }
1576
- s4 = peg$parse__();
1577
- peg$savedPos = s0;
1578
- s0 = peg$f16(s1, s2);
1735
+ s0 = s1;
1579
1736
  } else {
1580
1737
  peg$currPos = s0;
1581
1738
  s0 = peg$FAILED;
@@ -1593,15 +1750,15 @@ function peg$parse(input, options) {
1593
1750
  if (s1 !== peg$FAILED) {
1594
1751
  s2 = peg$parse__();
1595
1752
  if (input.charCodeAt(peg$currPos) === 58) {
1596
- s3 = peg$c9;
1753
+ s3 = peg$c12;
1597
1754
  peg$currPos++;
1598
1755
  } else {
1599
1756
  s3 = peg$FAILED;
1600
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1757
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1601
1758
  }
1602
1759
  if (s3 !== peg$FAILED) {
1603
1760
  s4 = peg$parse__();
1604
- s5 = peg$parseexpr();
1761
+ s5 = peg$parsepipeline();
1605
1762
  if (s5 !== peg$FAILED) {
1606
1763
  s0 = [ s1, s5 ];
1607
1764
  } else {
@@ -1619,7 +1776,7 @@ function peg$parse(input, options) {
1619
1776
  peg$silentFails--;
1620
1777
  if (s0 === peg$FAILED) {
1621
1778
  s1 = peg$FAILED;
1622
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
1779
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
1623
1780
  }
1624
1781
 
1625
1782
  return s0;
@@ -1636,23 +1793,77 @@ function peg$parse(input, options) {
1636
1793
  peg$savedPos = s0;
1637
1794
  s1 = peg$f17(s1);
1638
1795
  }
1639
- s0 = s1;
1796
+ s0 = s1;
1797
+ }
1798
+
1799
+ return s0;
1800
+ }
1801
+
1802
+ function peg$parseparameterizedLambda() {
1803
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1804
+
1805
+ s0 = peg$currPos;
1806
+ if (input.charCodeAt(peg$currPos) === 40) {
1807
+ s1 = peg$c11;
1808
+ peg$currPos++;
1809
+ } else {
1810
+ s1 = peg$FAILED;
1811
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1812
+ }
1813
+ if (s1 !== peg$FAILED) {
1814
+ s2 = peg$parse__();
1815
+ s3 = peg$parseidentifierList();
1816
+ if (s3 === peg$FAILED) {
1817
+ s3 = null;
1818
+ }
1819
+ s4 = peg$parse__();
1820
+ if (input.charCodeAt(peg$currPos) === 41) {
1821
+ s5 = peg$c4;
1822
+ peg$currPos++;
1823
+ } else {
1824
+ s5 = peg$FAILED;
1825
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1826
+ }
1827
+ if (s5 !== peg$FAILED) {
1828
+ s6 = peg$parse__();
1829
+ s7 = peg$parsedoubleArrow();
1830
+ if (s7 !== peg$FAILED) {
1831
+ s8 = peg$parse__();
1832
+ s9 = peg$parsepipeline();
1833
+ if (s9 !== peg$FAILED) {
1834
+ peg$savedPos = s0;
1835
+ s0 = peg$f18(s3, s9);
1836
+ } else {
1837
+ peg$currPos = s0;
1838
+ s0 = peg$FAILED;
1839
+ }
1840
+ } else {
1841
+ peg$currPos = s0;
1842
+ s0 = peg$FAILED;
1843
+ }
1844
+ } else {
1845
+ peg$currPos = s0;
1846
+ s0 = peg$FAILED;
1847
+ }
1848
+ } else {
1849
+ peg$currPos = s0;
1850
+ s0 = peg$FAILED;
1640
1851
  }
1641
1852
 
1642
1853
  return s0;
1643
1854
  }
1644
1855
 
1645
1856
  function peg$parseparensArgs() {
1646
- var s0, s1, s2, s3, s4;
1857
+ var s0, s1, s2, s3, s4, s5;
1647
1858
 
1648
1859
  peg$silentFails++;
1649
1860
  s0 = peg$currPos;
1650
1861
  if (input.charCodeAt(peg$currPos) === 40) {
1651
- s1 = peg$c7;
1862
+ s1 = peg$c11;
1652
1863
  peg$currPos++;
1653
1864
  } else {
1654
1865
  s1 = peg$FAILED;
1655
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1866
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1656
1867
  }
1657
1868
  if (s1 !== peg$FAILED) {
1658
1869
  s2 = peg$parse__();
@@ -1660,16 +1871,17 @@ function peg$parse(input, options) {
1660
1871
  if (s3 === peg$FAILED) {
1661
1872
  s3 = null;
1662
1873
  }
1874
+ s4 = peg$parse__();
1663
1875
  if (input.charCodeAt(peg$currPos) === 41) {
1664
- s4 = peg$c8;
1876
+ s5 = peg$c4;
1665
1877
  peg$currPos++;
1666
1878
  } else {
1667
- s4 = peg$FAILED;
1668
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
1879
+ s5 = peg$FAILED;
1880
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1669
1881
  }
1670
- if (s4 !== peg$FAILED) {
1882
+ if (s5 !== peg$FAILED) {
1671
1883
  peg$savedPos = s0;
1672
- s0 = peg$f18(s3);
1884
+ s0 = peg$f19(s3);
1673
1885
  } else {
1674
1886
  peg$currPos = s0;
1675
1887
  s0 = peg$FAILED;
@@ -1681,49 +1893,63 @@ function peg$parse(input, options) {
1681
1893
  peg$silentFails--;
1682
1894
  if (s0 === peg$FAILED) {
1683
1895
  s1 = peg$FAILED;
1684
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
1896
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
1685
1897
  }
1686
1898
 
1687
1899
  return s0;
1688
1900
  }
1689
1901
 
1690
- function peg$parseseparator() {
1691
- var s0, s1, s2, s3;
1902
+ function peg$parsepipeline() {
1903
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1692
1904
 
1693
1905
  s0 = peg$currPos;
1694
- s1 = peg$parse__();
1695
- if (input.charCodeAt(peg$currPos) === 44) {
1696
- s2 = peg$c16;
1697
- peg$currPos++;
1698
- } else {
1906
+ s1 = peg$currPos;
1907
+ s2 = peg$currPos;
1908
+ s3 = [];
1909
+ s4 = peg$parsestep();
1910
+ while (s4 !== peg$FAILED) {
1911
+ s3.push(s4);
1912
+ s4 = peg$currPos;
1913
+ s5 = peg$currPos;
1914
+ s6 = peg$parse__();
1915
+ s7 = peg$parsesingleArrow();
1916
+ if (s7 !== peg$FAILED) {
1917
+ s8 = peg$parse__();
1918
+ s6 = [s6, s7, s8];
1919
+ s5 = s6;
1920
+ } else {
1921
+ peg$currPos = s5;
1922
+ s5 = peg$FAILED;
1923
+ }
1924
+ if (s5 !== peg$FAILED) {
1925
+ s5 = peg$parsestep();
1926
+ if (s5 === peg$FAILED) {
1927
+ peg$currPos = s4;
1928
+ s4 = peg$FAILED;
1929
+ } else {
1930
+ s4 = s5;
1931
+ }
1932
+ } else {
1933
+ s4 = s5;
1934
+ }
1935
+ }
1936
+ if (s3.length < 1) {
1937
+ peg$currPos = s2;
1699
1938
  s2 = peg$FAILED;
1700
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
1939
+ } else {
1940
+ s2 = s3;
1701
1941
  }
1702
1942
  if (s2 !== peg$FAILED) {
1703
- s3 = peg$parse__();
1704
- s1 = [s1, s2, s3];
1705
- s0 = s1;
1943
+ s1 = s2;
1706
1944
  } else {
1707
- peg$currPos = s0;
1708
- s0 = peg$FAILED;
1709
- }
1710
- if (s0 === peg$FAILED) {
1711
- s0 = peg$parsewhitespaceWithNewLine();
1945
+ peg$currPos = s1;
1946
+ s1 = peg$FAILED;
1712
1947
  }
1713
-
1714
- return s0;
1715
- }
1716
-
1717
- function peg$parsesign() {
1718
- var s0;
1719
-
1720
- if (peg$r4.test(input.charAt(peg$currPos))) {
1721
- s0 = input.charAt(peg$currPos);
1722
- peg$currPos++;
1723
- } else {
1724
- s0 = peg$FAILED;
1725
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
1948
+ if (s1 !== peg$FAILED) {
1949
+ peg$savedPos = s0;
1950
+ s1 = peg$f20(s1);
1726
1951
  }
1952
+ s0 = s1;
1727
1953
 
1728
1954
  return s0;
1729
1955
  }
@@ -1733,39 +1959,34 @@ function peg$parse(input, options) {
1733
1959
 
1734
1960
  peg$silentFails++;
1735
1961
  s0 = peg$currPos;
1736
- s1 = peg$parsepathKey();
1737
- if (input.charCodeAt(peg$currPos) === 47) {
1738
- s2 = peg$c10;
1739
- peg$currPos++;
1740
- } else {
1741
- s2 = peg$FAILED;
1742
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1743
- }
1744
- if (s2 !== peg$FAILED) {
1745
- s3 = peg$parsepath();
1962
+ s1 = [];
1963
+ s2 = peg$parsepathKey();
1964
+ while (s2 !== peg$FAILED) {
1965
+ s1.push(s2);
1966
+ s2 = peg$currPos;
1967
+ if (input.charCodeAt(peg$currPos) === 47) {
1968
+ s3 = peg$c15;
1969
+ peg$currPos++;
1970
+ } else {
1971
+ s3 = peg$FAILED;
1972
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1973
+ }
1746
1974
  if (s3 !== peg$FAILED) {
1747
- peg$savedPos = s0;
1748
- s0 = peg$f19(s1, s3);
1975
+ s3 = peg$parsepathKey();
1976
+ s2 = s3;
1749
1977
  } else {
1750
- peg$currPos = s0;
1751
- s0 = peg$FAILED;
1978
+ s2 = s3;
1752
1979
  }
1753
- } else {
1980
+ }
1981
+ if (s1.length < 1) {
1754
1982
  peg$currPos = s0;
1755
1983
  s0 = peg$FAILED;
1756
- }
1757
- if (s0 === peg$FAILED) {
1758
- s0 = peg$currPos;
1759
- s1 = peg$parsepathKey();
1760
- peg$savedPos = s0;
1761
- s1 = peg$f20(s1);
1984
+ } else {
1762
1985
  s0 = s1;
1763
1986
  }
1764
1987
  peg$silentFails--;
1765
- if (s0 === peg$FAILED) {
1766
- s1 = peg$FAILED;
1767
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
1768
- }
1988
+ s1 = peg$FAILED;
1989
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
1769
1990
 
1770
1991
  return s0;
1771
1992
  }
@@ -1786,7 +2007,7 @@ function peg$parse(input, options) {
1786
2007
  s0 = s1;
1787
2008
  peg$silentFails--;
1788
2009
  s1 = peg$FAILED;
1789
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2010
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
1790
2011
 
1791
2012
  return s0;
1792
2013
  }
@@ -1799,20 +2020,20 @@ function peg$parse(input, options) {
1799
2020
  s1 = peg$parseprotocol();
1800
2021
  if (s1 !== peg$FAILED) {
1801
2022
  if (input.charCodeAt(peg$currPos) === 58) {
1802
- s2 = peg$c9;
2023
+ s2 = peg$c12;
1803
2024
  peg$currPos++;
1804
2025
  } else {
1805
2026
  s2 = peg$FAILED;
1806
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
2027
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1807
2028
  }
1808
2029
  if (s2 !== peg$FAILED) {
1809
2030
  s3 = [];
1810
2031
  if (input.charCodeAt(peg$currPos) === 47) {
1811
- s4 = peg$c10;
2032
+ s4 = peg$c15;
1812
2033
  peg$currPos++;
1813
2034
  } else {
1814
2035
  s4 = peg$FAILED;
1815
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2036
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1816
2037
  }
1817
2038
  while (s4 !== peg$FAILED) {
1818
2039
  s3.push(s4);
@@ -1820,11 +2041,11 @@ function peg$parse(input, options) {
1820
2041
  s4 = peg$FAILED;
1821
2042
  } else {
1822
2043
  if (input.charCodeAt(peg$currPos) === 47) {
1823
- s4 = peg$c10;
2044
+ s4 = peg$c15;
1824
2045
  peg$currPos++;
1825
2046
  } else {
1826
2047
  s4 = peg$FAILED;
1827
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2048
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1828
2049
  }
1829
2050
  }
1830
2051
  }
@@ -1851,7 +2072,7 @@ function peg$parse(input, options) {
1851
2072
  peg$silentFails--;
1852
2073
  if (s0 === peg$FAILED) {
1853
2074
  s1 = peg$FAILED;
1854
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
2075
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
1855
2076
  }
1856
2077
 
1857
2078
  return s0;
@@ -1868,7 +2089,7 @@ function peg$parse(input, options) {
1868
2089
  peg$silentFails--;
1869
2090
  if (s0 === peg$FAILED) {
1870
2091
  s1 = peg$FAILED;
1871
- if (peg$silentFails === 0) { peg$fail(peg$e50); }
2092
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
1872
2093
  }
1873
2094
 
1874
2095
  return s0;
@@ -1879,12 +2100,12 @@ function peg$parse(input, options) {
1879
2100
 
1880
2101
  peg$silentFails++;
1881
2102
  s0 = peg$currPos;
1882
- if (input.substr(peg$currPos, 5) === peg$c17) {
1883
- s1 = peg$c17;
2103
+ if (input.substr(peg$currPos, 5) === peg$c20) {
2104
+ s1 = peg$c20;
1884
2105
  peg$currPos += 5;
1885
2106
  } else {
1886
2107
  s1 = peg$FAILED;
1887
- if (peg$silentFails === 0) { peg$fail(peg$e52); }
2108
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
1888
2109
  }
1889
2110
  if (s1 !== peg$FAILED) {
1890
2111
  peg$savedPos = s0;
@@ -1893,12 +2114,12 @@ function peg$parse(input, options) {
1893
2114
  s0 = s1;
1894
2115
  if (s0 === peg$FAILED) {
1895
2116
  s0 = peg$currPos;
1896
- if (input.substr(peg$currPos, 4) === peg$c18) {
1897
- s1 = peg$c18;
2117
+ if (input.substr(peg$currPos, 4) === peg$c21) {
2118
+ s1 = peg$c21;
1898
2119
  peg$currPos += 4;
1899
2120
  } else {
1900
2121
  s1 = peg$FAILED;
1901
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
2122
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
1902
2123
  }
1903
2124
  if (s1 !== peg$FAILED) {
1904
2125
  peg$savedPos = s0;
@@ -1907,12 +2128,12 @@ function peg$parse(input, options) {
1907
2128
  s0 = s1;
1908
2129
  if (s0 === peg$FAILED) {
1909
2130
  s0 = peg$currPos;
1910
- if (input.substr(peg$currPos, 7) === peg$c19) {
1911
- s1 = peg$c19;
2131
+ if (input.substr(peg$currPos, 7) === peg$c22) {
2132
+ s1 = peg$c22;
1912
2133
  peg$currPos += 7;
1913
2134
  } else {
1914
2135
  s1 = peg$FAILED;
1915
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
2136
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
1916
2137
  }
1917
2138
  if (s1 !== peg$FAILED) {
1918
2139
  peg$savedPos = s0;
@@ -1921,12 +2142,12 @@ function peg$parse(input, options) {
1921
2142
  s0 = s1;
1922
2143
  if (s0 === peg$FAILED) {
1923
2144
  s0 = peg$currPos;
1924
- if (input.substr(peg$currPos, 9) === peg$c20) {
1925
- s1 = peg$c20;
2145
+ if (input.substr(peg$currPos, 9) === peg$c23) {
2146
+ s1 = peg$c23;
1926
2147
  peg$currPos += 9;
1927
2148
  } else {
1928
2149
  s1 = peg$FAILED;
1929
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
2150
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
1930
2151
  }
1931
2152
  if (s1 !== peg$FAILED) {
1932
2153
  peg$savedPos = s0;
@@ -1935,12 +2156,12 @@ function peg$parse(input, options) {
1935
2156
  s0 = s1;
1936
2157
  if (s0 === peg$FAILED) {
1937
2158
  s0 = peg$currPos;
1938
- if (input.substr(peg$currPos, 8) === peg$c21) {
1939
- s1 = peg$c21;
2159
+ if (input.substr(peg$currPos, 8) === peg$c24) {
2160
+ s1 = peg$c24;
1940
2161
  peg$currPos += 8;
1941
2162
  } else {
1942
2163
  s1 = peg$FAILED;
1943
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
2164
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
1944
2165
  }
1945
2166
  if (s1 !== peg$FAILED) {
1946
2167
  peg$savedPos = s0;
@@ -1949,12 +2170,12 @@ function peg$parse(input, options) {
1949
2170
  s0 = s1;
1950
2171
  if (s0 === peg$FAILED) {
1951
2172
  s0 = peg$currPos;
1952
- if (input.substr(peg$currPos, 4) === peg$c22) {
1953
- s1 = peg$c22;
2173
+ if (input.substr(peg$currPos, 4) === peg$c25) {
2174
+ s1 = peg$c25;
1954
2175
  peg$currPos += 4;
1955
2176
  } else {
1956
2177
  s1 = peg$FAILED;
1957
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
2178
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
1958
2179
  }
1959
2180
  if (s1 !== peg$FAILED) {
1960
2181
  peg$savedPos = s0;
@@ -1969,7 +2190,7 @@ function peg$parse(input, options) {
1969
2190
  peg$silentFails--;
1970
2191
  if (s0 === peg$FAILED) {
1971
2192
  s1 = peg$FAILED;
1972
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
2193
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
1973
2194
  }
1974
2195
 
1975
2196
  return s0;
@@ -1989,7 +2210,71 @@ function peg$parse(input, options) {
1989
2210
  peg$silentFails--;
1990
2211
  if (s0 === peg$FAILED) {
1991
2212
  s1 = peg$FAILED;
1992
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
2213
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
2214
+ }
2215
+
2216
+ return s0;
2217
+ }
2218
+
2219
+ function peg$parseseparator() {
2220
+ var s0, s1, s2, s3;
2221
+
2222
+ s0 = peg$currPos;
2223
+ s1 = peg$parse__();
2224
+ if (input.charCodeAt(peg$currPos) === 44) {
2225
+ s2 = peg$c26;
2226
+ peg$currPos++;
2227
+ } else {
2228
+ s2 = peg$FAILED;
2229
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
2230
+ }
2231
+ if (s2 !== peg$FAILED) {
2232
+ s3 = peg$parse__();
2233
+ s1 = [s1, s2, s3];
2234
+ s0 = s1;
2235
+ } else {
2236
+ peg$currPos = s0;
2237
+ s0 = peg$FAILED;
2238
+ }
2239
+ if (s0 === peg$FAILED) {
2240
+ s0 = peg$parsewhitespaceWithNewLine();
2241
+ }
2242
+
2243
+ return s0;
2244
+ }
2245
+
2246
+ function peg$parsesign() {
2247
+ var s0;
2248
+
2249
+ if (peg$r4.test(input.charAt(peg$currPos))) {
2250
+ s0 = input.charAt(peg$currPos);
2251
+ peg$currPos++;
2252
+ } else {
2253
+ s0 = peg$FAILED;
2254
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
2255
+ }
2256
+
2257
+ return s0;
2258
+ }
2259
+
2260
+ function peg$parsesingleArrow() {
2261
+ var s0;
2262
+
2263
+ if (input.charCodeAt(peg$currPos) === 8594) {
2264
+ s0 = peg$c27;
2265
+ peg$currPos++;
2266
+ } else {
2267
+ s0 = peg$FAILED;
2268
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
2269
+ }
2270
+ if (s0 === peg$FAILED) {
2271
+ if (input.substr(peg$currPos, 2) === peg$c28) {
2272
+ s0 = peg$c28;
2273
+ peg$currPos += 2;
2274
+ } else {
2275
+ s0 = peg$FAILED;
2276
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
2277
+ }
1993
2278
  }
1994
2279
 
1995
2280
  return s0;
@@ -2001,11 +2286,11 @@ function peg$parse(input, options) {
2001
2286
  peg$silentFails++;
2002
2287
  s0 = peg$currPos;
2003
2288
  if (input.charCodeAt(peg$currPos) === 39) {
2004
- s1 = peg$c23;
2289
+ s1 = peg$c29;
2005
2290
  peg$currPos++;
2006
2291
  } else {
2007
2292
  s1 = peg$FAILED;
2008
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2293
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2009
2294
  }
2010
2295
  if (s1 !== peg$FAILED) {
2011
2296
  s2 = [];
@@ -2015,11 +2300,11 @@ function peg$parse(input, options) {
2015
2300
  s3 = peg$parsesingleQuoteStringChar();
2016
2301
  }
2017
2302
  if (input.charCodeAt(peg$currPos) === 39) {
2018
- s3 = peg$c23;
2303
+ s3 = peg$c29;
2019
2304
  peg$currPos++;
2020
2305
  } else {
2021
2306
  s3 = peg$FAILED;
2022
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2307
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2023
2308
  }
2024
2309
  if (s3 !== peg$FAILED) {
2025
2310
  peg$savedPos = s0;
@@ -2035,7 +2320,7 @@ function peg$parse(input, options) {
2035
2320
  peg$silentFails--;
2036
2321
  if (s0 === peg$FAILED) {
2037
2322
  s1 = peg$FAILED;
2038
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
2323
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
2039
2324
  }
2040
2325
 
2041
2326
  return s0;
@@ -2048,11 +2333,11 @@ function peg$parse(input, options) {
2048
2333
  s1 = peg$currPos;
2049
2334
  peg$silentFails++;
2050
2335
  if (input.charCodeAt(peg$currPos) === 39) {
2051
- s2 = peg$c23;
2336
+ s2 = peg$c29;
2052
2337
  peg$currPos++;
2053
2338
  } else {
2054
2339
  s2 = peg$FAILED;
2055
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2340
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2056
2341
  }
2057
2342
  if (s2 === peg$FAILED) {
2058
2343
  s2 = peg$parsenewLine();
@@ -2080,6 +2365,50 @@ function peg$parse(input, options) {
2080
2365
  return s0;
2081
2366
  }
2082
2367
 
2368
+ function peg$parsestep() {
2369
+ var s0;
2370
+
2371
+ s0 = peg$parsenumber();
2372
+ if (s0 === peg$FAILED) {
2373
+ s0 = peg$parsefunctionComposition();
2374
+ if (s0 === peg$FAILED) {
2375
+ s0 = peg$parseabsoluteFilePath();
2376
+ if (s0 === peg$FAILED) {
2377
+ s0 = peg$parsearray();
2378
+ if (s0 === peg$FAILED) {
2379
+ s0 = peg$parseobject();
2380
+ if (s0 === peg$FAILED) {
2381
+ s0 = peg$parsetree();
2382
+ if (s0 === peg$FAILED) {
2383
+ s0 = peg$parselambda();
2384
+ if (s0 === peg$FAILED) {
2385
+ s0 = peg$parseparameterizedLambda();
2386
+ if (s0 === peg$FAILED) {
2387
+ s0 = peg$parsetemplateLiteral();
2388
+ if (s0 === peg$FAILED) {
2389
+ s0 = peg$parsestring();
2390
+ if (s0 === peg$FAILED) {
2391
+ s0 = peg$parsegroup();
2392
+ if (s0 === peg$FAILED) {
2393
+ s0 = peg$parseprotocolCall();
2394
+ if (s0 === peg$FAILED) {
2395
+ s0 = peg$parsescopeReference();
2396
+ }
2397
+ }
2398
+ }
2399
+ }
2400
+ }
2401
+ }
2402
+ }
2403
+ }
2404
+ }
2405
+ }
2406
+ }
2407
+ }
2408
+
2409
+ return s0;
2410
+ }
2411
+
2083
2412
  function peg$parsestart() {
2084
2413
  var s0;
2085
2414
 
@@ -2099,7 +2428,7 @@ function peg$parse(input, options) {
2099
2428
  peg$silentFails--;
2100
2429
  if (s0 === peg$FAILED) {
2101
2430
  s1 = peg$FAILED;
2102
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
2431
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2103
2432
  }
2104
2433
 
2105
2434
  return s0;
@@ -2116,7 +2445,7 @@ function peg$parse(input, options) {
2116
2445
  s0 = s1;
2117
2446
  peg$silentFails--;
2118
2447
  s1 = peg$FAILED;
2119
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2448
+ if (peg$silentFails === 0) { peg$fail(peg$e67); }
2120
2449
 
2121
2450
  return s0;
2122
2451
  }
@@ -2127,12 +2456,12 @@ function peg$parse(input, options) {
2127
2456
  s0 = peg$currPos;
2128
2457
  s1 = peg$currPos;
2129
2458
  peg$silentFails++;
2130
- if (input.substr(peg$currPos, 2) === peg$c24) {
2131
- s2 = peg$c24;
2459
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2460
+ s2 = peg$c30;
2132
2461
  peg$currPos += 2;
2133
2462
  } else {
2134
2463
  s2 = peg$FAILED;
2135
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2464
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2136
2465
  }
2137
2466
  peg$silentFails--;
2138
2467
  if (s2 === peg$FAILED) {
@@ -2203,7 +2532,7 @@ function peg$parse(input, options) {
2203
2532
  peg$silentFails--;
2204
2533
  if (s0 === peg$FAILED) {
2205
2534
  s1 = peg$FAILED;
2206
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2535
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
2207
2536
  }
2208
2537
 
2209
2538
  return s0;
@@ -2215,20 +2544,20 @@ function peg$parse(input, options) {
2215
2544
  peg$silentFails++;
2216
2545
  s0 = peg$currPos;
2217
2546
  if (input.charCodeAt(peg$currPos) === 96) {
2218
- s1 = peg$c25;
2547
+ s1 = peg$c31;
2219
2548
  peg$currPos++;
2220
2549
  } else {
2221
2550
  s1 = peg$FAILED;
2222
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2551
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2223
2552
  }
2224
2553
  if (s1 !== peg$FAILED) {
2225
2554
  s2 = peg$parsetemplateLiteralContents();
2226
2555
  if (input.charCodeAt(peg$currPos) === 96) {
2227
- s3 = peg$c25;
2556
+ s3 = peg$c31;
2228
2557
  peg$currPos++;
2229
2558
  } else {
2230
2559
  s3 = peg$FAILED;
2231
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2560
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2232
2561
  }
2233
2562
  if (s3 !== peg$FAILED) {
2234
2563
  s0 = s2;
@@ -2243,7 +2572,7 @@ function peg$parse(input, options) {
2243
2572
  peg$silentFails--;
2244
2573
  if (s0 === peg$FAILED) {
2245
2574
  s1 = peg$FAILED;
2246
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2575
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
2247
2576
  }
2248
2577
 
2249
2578
  return s0;
@@ -2256,19 +2585,19 @@ function peg$parse(input, options) {
2256
2585
  s1 = peg$currPos;
2257
2586
  peg$silentFails++;
2258
2587
  if (input.charCodeAt(peg$currPos) === 96) {
2259
- s2 = peg$c25;
2588
+ s2 = peg$c31;
2260
2589
  peg$currPos++;
2261
2590
  } else {
2262
2591
  s2 = peg$FAILED;
2263
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2592
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2264
2593
  }
2265
2594
  if (s2 === peg$FAILED) {
2266
- if (input.substr(peg$currPos, 2) === peg$c24) {
2267
- s2 = peg$c24;
2595
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2596
+ s2 = peg$c30;
2268
2597
  peg$currPos += 2;
2269
2598
  } else {
2270
2599
  s2 = peg$FAILED;
2271
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2600
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2272
2601
  }
2273
2602
  }
2274
2603
  peg$silentFails--;
@@ -2345,22 +2674,22 @@ function peg$parse(input, options) {
2345
2674
 
2346
2675
  peg$silentFails++;
2347
2676
  s0 = peg$currPos;
2348
- if (input.substr(peg$currPos, 2) === peg$c24) {
2349
- s1 = peg$c24;
2677
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2678
+ s1 = peg$c30;
2350
2679
  peg$currPos += 2;
2351
2680
  } else {
2352
2681
  s1 = peg$FAILED;
2353
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2682
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2354
2683
  }
2355
2684
  if (s1 !== peg$FAILED) {
2356
2685
  s2 = peg$parseexpression();
2357
2686
  if (s2 !== peg$FAILED) {
2358
- if (input.substr(peg$currPos, 2) === peg$c26) {
2359
- s3 = peg$c26;
2687
+ if (input.substr(peg$currPos, 2) === peg$c32) {
2688
+ s3 = peg$c32;
2360
2689
  peg$currPos += 2;
2361
2690
  } else {
2362
2691
  s3 = peg$FAILED;
2363
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2692
+ if (peg$silentFails === 0) { peg$fail(peg$e73); }
2364
2693
  }
2365
2694
  if (s3 !== peg$FAILED) {
2366
2695
  s0 = s2;
@@ -2379,7 +2708,7 @@ function peg$parse(input, options) {
2379
2708
  peg$silentFails--;
2380
2709
  if (s0 === peg$FAILED) {
2381
2710
  s1 = peg$FAILED;
2382
- if (peg$silentFails === 0) { peg$fail(peg$e67); }
2711
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
2383
2712
  }
2384
2713
 
2385
2714
  return s0;
@@ -2395,7 +2724,7 @@ function peg$parse(input, options) {
2395
2724
  peg$currPos++;
2396
2725
  } else {
2397
2726
  s0 = peg$FAILED;
2398
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
2727
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2399
2728
  }
2400
2729
  }
2401
2730
 
@@ -2403,16 +2732,16 @@ function peg$parse(input, options) {
2403
2732
  }
2404
2733
 
2405
2734
  function peg$parsetree() {
2406
- var s0, s1, s2, s3, s4;
2735
+ var s0, s1, s2, s3, s4, s5;
2407
2736
 
2408
2737
  peg$silentFails++;
2409
2738
  s0 = peg$currPos;
2410
2739
  if (input.charCodeAt(peg$currPos) === 123) {
2411
- s1 = peg$c14;
2740
+ s1 = peg$c19;
2412
2741
  peg$currPos++;
2413
2742
  } else {
2414
2743
  s1 = peg$FAILED;
2415
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
2744
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
2416
2745
  }
2417
2746
  if (s1 !== peg$FAILED) {
2418
2747
  s2 = peg$parse__();
@@ -2420,14 +2749,9 @@ function peg$parse(input, options) {
2420
2749
  if (s3 === peg$FAILED) {
2421
2750
  s3 = null;
2422
2751
  }
2423
- if (input.charCodeAt(peg$currPos) === 125) {
2424
- s4 = peg$c15;
2425
- peg$currPos++;
2426
- } else {
2427
- s4 = peg$FAILED;
2428
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
2429
- }
2430
- if (s4 !== peg$FAILED) {
2752
+ s4 = peg$parse__();
2753
+ s5 = peg$parseclosingBrace();
2754
+ if (s5 !== peg$FAILED) {
2431
2755
  peg$savedPos = s0;
2432
2756
  s0 = peg$f36(s3);
2433
2757
  } else {
@@ -2441,57 +2765,47 @@ function peg$parse(input, options) {
2441
2765
  peg$silentFails--;
2442
2766
  if (s0 === peg$FAILED) {
2443
2767
  s1 = peg$FAILED;
2444
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
2768
+ if (peg$silentFails === 0) { peg$fail(peg$e74); }
2445
2769
  }
2446
2770
 
2447
2771
  return s0;
2448
2772
  }
2449
2773
 
2450
2774
  function peg$parsetreeAssignments() {
2451
- var s0, s1, s2, s3, s4, s5;
2775
+ var s0, s1, s2, s3, s4;
2452
2776
 
2453
2777
  s0 = peg$currPos;
2454
- s1 = peg$parseassignmentOrShorthand();
2455
- if (s1 !== peg$FAILED) {
2456
- s2 = [];
2778
+ s1 = peg$currPos;
2779
+ s2 = [];
2780
+ s3 = peg$parseassignmentOrShorthand();
2781
+ while (s3 !== peg$FAILED) {
2782
+ s2.push(s3);
2457
2783
  s3 = peg$currPos;
2458
2784
  s4 = peg$parseseparator();
2459
2785
  if (s4 !== peg$FAILED) {
2460
- s5 = peg$parseassignmentOrShorthand();
2461
- if (s5 !== peg$FAILED) {
2462
- s3 = s5;
2463
- } else {
2786
+ s4 = peg$parseassignmentOrShorthand();
2787
+ if (s4 === peg$FAILED) {
2464
2788
  peg$currPos = s3;
2465
2789
  s3 = peg$FAILED;
2466
- }
2467
- } else {
2468
- peg$currPos = s3;
2469
- s3 = peg$FAILED;
2470
- }
2471
- while (s3 !== peg$FAILED) {
2472
- s2.push(s3);
2473
- s3 = peg$currPos;
2474
- s4 = peg$parseseparator();
2475
- if (s4 !== peg$FAILED) {
2476
- s5 = peg$parseassignmentOrShorthand();
2477
- if (s5 !== peg$FAILED) {
2478
- s3 = s5;
2479
- } else {
2480
- peg$currPos = s3;
2481
- s3 = peg$FAILED;
2482
- }
2483
2790
  } else {
2484
- peg$currPos = s3;
2485
- s3 = peg$FAILED;
2791
+ s3 = s4;
2486
2792
  }
2793
+ } else {
2794
+ s3 = s4;
2487
2795
  }
2488
- s3 = peg$parseseparator();
2489
- if (s3 === peg$FAILED) {
2490
- s3 = null;
2796
+ }
2797
+ if (s2.length < 1) {
2798
+ peg$currPos = s1;
2799
+ s1 = peg$FAILED;
2800
+ } else {
2801
+ s1 = s2;
2802
+ }
2803
+ if (s1 !== peg$FAILED) {
2804
+ s2 = peg$parseseparator();
2805
+ if (s2 === peg$FAILED) {
2806
+ s2 = null;
2491
2807
  }
2492
- s4 = peg$parse__();
2493
- peg$savedPos = s0;
2494
- s0 = peg$f37(s1, s2);
2808
+ s0 = s1;
2495
2809
  } else {
2496
2810
  peg$currPos = s0;
2497
2811
  s0 = peg$FAILED;