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