@weborigami/language 0.0.41 → 0.0.43

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,94 +192,102 @@ 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, multiLineComment: peg$parsemultiLineComment, 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, singleLineComment: peg$parsesingleLineComment, 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 = "=";
198
+ var peg$c0 = "//";
189
199
  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 = "}}";
217
-
218
- var peg$r0 = /^[^\n\r]/;
219
- var peg$r1 = /^[0-9]/;
220
- var peg$r2 = /^[^(){}[\]<>,\/:=`"'\\# \t\n\r]/;
221
- var peg$r3 = /^[ \t]/;
222
- var peg$r4 = /^[+\-]/;
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 = "/*";
215
+ var peg$c17 = "*/";
216
+ var peg$c18 = "\n";
217
+ var peg$c19 = "\r\n";
218
+ var peg$c20 = "\r";
219
+ var peg$c21 = "{";
220
+ var peg$c22 = "https";
221
+ var peg$c23 = "http";
222
+ var peg$c24 = "package";
223
+ var peg$c25 = "treehttps";
224
+ var peg$c26 = "treehttp";
225
+ var peg$c27 = "tree";
226
+ var peg$c28 = ",";
227
+ var peg$c29 = "\u2192";
228
+ var peg$c30 = "->";
229
+ var peg$c31 = "#";
230
+ var peg$c32 = "'";
231
+ var peg$c33 = "{{";
232
+ var peg$c34 = "${";
233
+ var peg$c35 = "`";
234
+ var peg$c36 = "}}";
235
+
236
+ var peg$r0 = /^[0-9]/;
237
+ var peg$r1 = /^[^(){}[\]<>\-=,\/:`"'\\# \u2192\u21D2\t\n\r]/;
238
+ var peg$r2 = /^[ \t]/;
239
+ var peg$r3 = /^[+\-]/;
240
+ var peg$r4 = /^[^\n\r]/;
223
241
 
224
242
  var peg$e0 = peg$otherExpectation("absolute file path");
225
- var peg$e1 = peg$otherExpectation("function arguments");
226
- var peg$e2 = peg$otherExpectation("tree assignment");
227
- var peg$e3 = peg$literalExpectation("=", false);
228
- var peg$e4 = peg$otherExpectation("array");
229
- var peg$e5 = peg$literalExpectation("[", false);
230
- var peg$e6 = peg$literalExpectation("]", false);
243
+ var peg$e1 = peg$literalExpectation("//", false);
244
+ var peg$e2 = peg$otherExpectation("function arguments");
245
+ var peg$e3 = peg$otherExpectation("array");
246
+ var peg$e4 = peg$literalExpectation("[", false);
247
+ var peg$e5 = peg$otherExpectation("tree assignment");
248
+ var peg$e6 = peg$literalExpectation("=", false);
231
249
  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);
250
+ var peg$e8 = peg$literalExpectation("}", false);
251
+ var peg$e9 = peg$anyExpectation();
252
+ var peg$e10 = peg$literalExpectation("]", false);
253
+ var peg$e11 = peg$literalExpectation(")", false);
254
+ var peg$e12 = peg$otherExpectation("comment");
255
+ var peg$e13 = peg$classExpectation([["0", "9"]], false, false);
256
+ var peg$e14 = peg$literalExpectation("\u21D2", false);
257
+ var peg$e15 = peg$literalExpectation("=>", false);
258
+ var peg$e16 = peg$otherExpectation("double quote string");
259
+ var peg$e17 = peg$literalExpectation("\"", false);
260
+ var peg$e18 = peg$otherExpectation("backslash-escaped character");
261
+ var peg$e19 = peg$literalExpectation("\\", false);
262
+ var peg$e20 = peg$otherExpectation("Origami expression");
263
+ var peg$e21 = peg$otherExpectation("floating-point number");
264
+ var peg$e22 = peg$literalExpectation(".", false);
265
+ var peg$e23 = peg$otherExpectation("function composition");
266
+ var peg$e24 = peg$otherExpectation("parenthetical group");
267
+ var peg$e25 = peg$literalExpectation("(", false);
268
+ var peg$e26 = peg$otherExpectation("HTTP/HTTPS host");
269
+ var peg$e27 = peg$literalExpectation(":", false);
270
+ var peg$e28 = peg$otherExpectation("identifier");
271
+ var peg$e29 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "-", "=", ",", "/", ":", "`", "\"", "'", "\\", "#", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
272
+ var peg$e30 = peg$literalExpectation("-", false);
273
+ var peg$e31 = peg$literalExpectation(">", false);
274
+ var peg$e32 = peg$otherExpectation("arguments with implicit parentheses");
275
+ var peg$e33 = peg$classExpectation([" ", "\t"], false, false);
276
+ var peg$e34 = peg$otherExpectation("integer");
277
+ var peg$e35 = peg$otherExpectation("lambda function");
278
+ var peg$e36 = peg$otherExpectation("path with a leading slash");
279
+ var peg$e37 = peg$literalExpectation("/", false);
280
+ var peg$e38 = peg$otherExpectation("list");
281
+ var peg$e39 = peg$literalExpectation("/*", false);
282
+ var peg$e40 = peg$literalExpectation("*/", false);
283
+ var peg$e41 = peg$literalExpectation("\n", false);
284
+ var peg$e42 = peg$literalExpectation("\r\n", false);
285
+ var peg$e43 = peg$literalExpectation("\r", false);
286
+ var peg$e44 = peg$otherExpectation("number");
287
+ var peg$e45 = peg$otherExpectation("object literal");
288
+ var peg$e46 = peg$literalExpectation("{", false);
289
+ var peg$e47 = peg$otherExpectation("object property");
290
+ var peg$e48 = peg$otherExpectation("function arguments in parentheses");
273
291
  var peg$e49 = peg$otherExpectation("slash-separated path");
274
292
  var peg$e50 = peg$otherExpectation("path element");
275
293
  var peg$e51 = peg$otherExpectation("function call using protocol: syntax");
@@ -282,73 +300,111 @@ function peg$parse(input, options) {
282
300
  var peg$e58 = peg$literalExpectation("treehttp", false);
283
301
  var peg$e59 = peg$literalExpectation("tree", false);
284
302
  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");
303
+ var peg$e61 = peg$literalExpectation(",", false);
304
+ var peg$e62 = peg$classExpectation(["+", "-"], false, false);
305
+ var peg$e63 = peg$literalExpectation("\u2192", false);
306
+ var peg$e64 = peg$literalExpectation("->", false);
307
+ var peg$e65 = peg$literalExpectation("#", false);
308
+ var peg$e66 = peg$classExpectation(["\n", "\r"], true, false);
309
+ var peg$e67 = peg$otherExpectation("single quote string");
310
+ var peg$e68 = peg$literalExpectation("'", false);
311
+ var peg$e69 = peg$otherExpectation("string");
312
+ var peg$e70 = peg$otherExpectation("template");
313
+ var peg$e71 = peg$literalExpectation("{{", false);
314
+ var peg$e72 = peg$literalExpectation("${", false);
315
+ var peg$e73 = peg$otherExpectation("template text");
316
+ var peg$e74 = peg$otherExpectation("template literal");
317
+ var peg$e75 = peg$literalExpectation("`", false);
318
+ var peg$e76 = peg$otherExpectation("template substitution");
319
+ var peg$e77 = peg$literalExpectation("}}", false);
320
+ var peg$e78 = peg$otherExpectation("tree literal");
296
321
 
297
322
  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(""); };
323
+ var peg$f1 = function(path) {
324
+ return annotate([[ops.filesRoot], ...path], location());
325
+ };
326
+ var peg$f2 = function(path) {
327
+ return annotate([ops.traverse, ...path], location());
328
+ };
329
+ var peg$f3 = function(list) {
330
+ return annotate([ops.array, ...(list ?? [])], location());
331
+ };
332
+ var peg$f4 = function(key) {
333
+ return annotate([key, [ops.inherited, key]], location());
334
+ };
335
+ var peg$f5 = function() {
336
+ error("Expected right curly brace");
337
+ };
303
338
  var peg$f6 = function() {
339
+ error("Expected right bracket");
340
+ };
341
+ var peg$f7 = function() {
342
+ error("Expected right parenthesis");
343
+ };
344
+ var peg$f8 = function(chars) { return chars.join(""); };
345
+ var peg$f9 = function() {
304
346
  return parseFloat(text());
305
347
  };
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);
348
+ var peg$f10 = function(target, chain, end) {
349
+ if (end) {
350
+ chain.push(end);
351
+ }
352
+ return annotate(makeFunctionCall(target, chain), location());
310
353
  };
311
- var peg$f10 = function(target, args) {
312
- return [target, ...args];
313
- };
314
354
  var peg$f11 = function() { return text(); };
315
- var peg$f12 = function() {
355
+ var peg$f12 = function(chars) { return chars.join(""); };
356
+ var peg$f13 = function() {
316
357
  return parseInt(text());
317
358
  };
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);
359
+ var peg$f14 = function(expr) {
360
+ return annotate([ops.lambda, null, expr], location());
361
+ };
362
+ var peg$f15 = function() { return annotate([""], location()); };
363
+ var peg$f16 = function() { return null; };
364
+ var peg$f17 = function(properties) {
365
+ return annotate([ops.object, ...(properties ?? [])], location());
366
+ };
367
+ var peg$f18 = function(key) {
368
+ return annotate([key, [ops.scope, key]], location());
324
369
  };
325
- var peg$f18 = function(key) { return [key, [ops.scope, key]]; };
326
370
  var peg$f19 = function(parameters, expr) {
327
- return [ops.lambda, parameters ?? [], expr];
371
+ return annotate([ops.lambda, parameters ?? [], expr], location());
328
372
  };
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 ?? [])];
373
+ var peg$f20 = function(list) {
374
+ return list ?? annotate([undefined], location());
375
+ };
376
+ var peg$f21 = function(steps) {
377
+ return annotate(makePipeline(steps), location());
378
+ };
379
+ var peg$f22 = function(key) { return key.join(""); };
380
+ var peg$f23 = function(protocol, host, path) {
381
+ return annotate([protocol, host, ...(path ?? [])], location());
382
+ };
383
+ var peg$f24 = function() { return ops.https; };
384
+ var peg$f25 = function() { return ops.http; };
385
+ var peg$f26 = function() { return [ops.scope, "@package"] };
386
+ var peg$f27 = function() { return ops.treeHttps; };
387
+ var peg$f28 = function() { return ops.treeHttp; };
388
+ var peg$f29 = function() { return ops.treeHttps; };
389
+ var peg$f30 = function(key) {
390
+ return annotate([ops.scope, key], location());
335
391
  };
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"] };
339
- 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); };
346
- 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);
392
+ var peg$f31 = function() { return null; };
393
+ var peg$f32 = function() { return null; };
394
+ var peg$f33 = function(chars) { return chars.join(""); };
395
+ var peg$f34 = function(contents) {
396
+ return annotate([ops.lambda, null, contents], location());
397
+ };
398
+ var peg$f35 = function(parts) {
399
+ return annotate(makeTemplate(parts), location());
400
+ };
401
+ var peg$f36 = function(chars) { return chars.join(""); };
402
+ var peg$f37 = function(parts) {
403
+ return annotate(makeTemplate(parts), location());
404
+ };
405
+ var peg$f38 = function(chars) { return chars.join(""); };
406
+ var peg$f39 = function(assignments) {
407
+ return annotate([ops.tree, ...(assignments ?? [])], location());
352
408
  };
353
409
  var peg$currPos = 0;
354
410
  var peg$savedPos = 0;
@@ -540,16 +596,39 @@ function peg$parse(input, options) {
540
596
  }
541
597
 
542
598
  function peg$parseabsoluteFilePath() {
543
- var s0, s1;
599
+ var s0, s1, s2;
544
600
 
545
601
  peg$silentFails++;
546
602
  s0 = peg$currPos;
547
- s1 = peg$parseleadingSlashPath();
603
+ s1 = peg$currPos;
604
+ peg$silentFails++;
605
+ if (input.substr(peg$currPos, 2) === peg$c0) {
606
+ s2 = peg$c0;
607
+ peg$currPos += 2;
608
+ } else {
609
+ s2 = peg$FAILED;
610
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
611
+ }
612
+ peg$silentFails--;
613
+ if (s2 === peg$FAILED) {
614
+ s1 = undefined;
615
+ } else {
616
+ peg$currPos = s1;
617
+ s1 = peg$FAILED;
618
+ }
548
619
  if (s1 !== peg$FAILED) {
549
- peg$savedPos = s0;
550
- s1 = peg$f1(s1);
620
+ s2 = peg$parseleadingSlashPath();
621
+ if (s2 !== peg$FAILED) {
622
+ peg$savedPos = s0;
623
+ s0 = peg$f1(s2);
624
+ } else {
625
+ peg$currPos = s0;
626
+ s0 = peg$FAILED;
627
+ }
628
+ } else {
629
+ peg$currPos = s0;
630
+ s0 = peg$FAILED;
551
631
  }
552
- s0 = s1;
553
632
  peg$silentFails--;
554
633
  if (s0 === peg$FAILED) {
555
634
  s1 = peg$FAILED;
@@ -576,7 +655,47 @@ function peg$parse(input, options) {
576
655
  peg$silentFails--;
577
656
  if (s0 === peg$FAILED) {
578
657
  s1 = peg$FAILED;
579
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
658
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
659
+ }
660
+
661
+ return s0;
662
+ }
663
+
664
+ function peg$parsearray() {
665
+ var s0, s1, s2, s3, s4, s5;
666
+
667
+ peg$silentFails++;
668
+ s0 = peg$currPos;
669
+ if (input.charCodeAt(peg$currPos) === 91) {
670
+ s1 = peg$c1;
671
+ peg$currPos++;
672
+ } else {
673
+ s1 = peg$FAILED;
674
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
675
+ }
676
+ if (s1 !== peg$FAILED) {
677
+ s2 = peg$parse__();
678
+ s3 = peg$parselist();
679
+ if (s3 === peg$FAILED) {
680
+ s3 = null;
681
+ }
682
+ s4 = peg$parse__();
683
+ s5 = peg$parseclosingBracket();
684
+ if (s5 !== peg$FAILED) {
685
+ peg$savedPos = s0;
686
+ s0 = peg$f3(s3);
687
+ } else {
688
+ peg$currPos = s0;
689
+ s0 = peg$FAILED;
690
+ }
691
+ } else {
692
+ peg$currPos = s0;
693
+ s0 = peg$FAILED;
694
+ }
695
+ peg$silentFails--;
696
+ if (s0 === peg$FAILED) {
697
+ s1 = peg$FAILED;
698
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
580
699
  }
581
700
 
582
701
  return s0;
@@ -591,15 +710,15 @@ function peg$parse(input, options) {
591
710
  if (s1 !== peg$FAILED) {
592
711
  s2 = peg$parse__();
593
712
  if (input.charCodeAt(peg$currPos) === 61) {
594
- s3 = peg$c0;
713
+ s3 = peg$c2;
595
714
  peg$currPos++;
596
715
  } else {
597
716
  s3 = peg$FAILED;
598
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
717
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
599
718
  }
600
719
  if (s3 !== peg$FAILED) {
601
720
  s4 = peg$parse__();
602
- s5 = peg$parseexpr();
721
+ s5 = peg$parsepipeline();
603
722
  if (s5 !== peg$FAILED) {
604
723
  s0 = [ s1, s5 ];
605
724
  } else {
@@ -617,7 +736,7 @@ function peg$parse(input, options) {
617
736
  peg$silentFails--;
618
737
  if (s0 === peg$FAILED) {
619
738
  s1 = peg$FAILED;
620
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
739
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
621
740
  }
622
741
 
623
742
  return s0;
@@ -632,7 +751,7 @@ function peg$parse(input, options) {
632
751
  s1 = peg$parseidentifier();
633
752
  if (s1 !== peg$FAILED) {
634
753
  peg$savedPos = s0;
635
- s1 = peg$f3(s1);
754
+ s1 = peg$f4(s1);
636
755
  }
637
756
  s0 = s1;
638
757
  }
@@ -640,51 +759,6 @@ function peg$parse(input, options) {
640
759
  return s0;
641
760
  }
642
761
 
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
762
  function peg$parsecallTarget() {
689
763
  var s0, s1;
690
764
 
@@ -723,47 +797,108 @@ function peg$parse(input, options) {
723
797
  return s0;
724
798
  }
725
799
 
726
- function peg$parsecomment() {
727
- var s0, s1, s2, s3;
800
+ function peg$parseclosingBrace() {
801
+ var s0, s1;
728
802
 
729
- peg$silentFails++;
730
- s0 = peg$currPos;
731
- if (input.charCodeAt(peg$currPos) === 35) {
732
- s1 = peg$c3;
803
+ if (input.charCodeAt(peg$currPos) === 125) {
804
+ s0 = peg$c3;
733
805
  peg$currPos++;
734
806
  } else {
735
- s1 = peg$FAILED;
736
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
807
+ s0 = peg$FAILED;
808
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
737
809
  }
738
- if (s1 !== peg$FAILED) {
739
- s2 = [];
740
- if (peg$r0.test(input.charAt(peg$currPos))) {
741
- s3 = input.charAt(peg$currPos);
810
+ if (s0 === peg$FAILED) {
811
+ s0 = peg$currPos;
812
+ if (input.length > peg$currPos) {
813
+ s1 = input.charAt(peg$currPos);
742
814
  peg$currPos++;
743
815
  } else {
744
- s3 = peg$FAILED;
745
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
816
+ s1 = peg$FAILED;
817
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
746
818
  }
747
- while (s3 !== peg$FAILED) {
748
- s2.push(s3);
749
- if (peg$r0.test(input.charAt(peg$currPos))) {
750
- s3 = input.charAt(peg$currPos);
751
- peg$currPos++;
752
- } else {
753
- s3 = peg$FAILED;
754
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
755
- }
819
+ if (s1 === peg$FAILED) {
820
+ s1 = null;
821
+ }
822
+ peg$savedPos = s0;
823
+ s1 = peg$f5();
824
+ s0 = s1;
825
+ }
826
+
827
+ return s0;
828
+ }
829
+
830
+ function peg$parseclosingBracket() {
831
+ var s0, s1;
832
+
833
+ if (input.charCodeAt(peg$currPos) === 93) {
834
+ s0 = peg$c4;
835
+ peg$currPos++;
836
+ } else {
837
+ s0 = peg$FAILED;
838
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
839
+ }
840
+ if (s0 === peg$FAILED) {
841
+ s0 = peg$currPos;
842
+ if (input.length > peg$currPos) {
843
+ s1 = input.charAt(peg$currPos);
844
+ peg$currPos++;
845
+ } else {
846
+ s1 = peg$FAILED;
847
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
848
+ }
849
+ if (s1 === peg$FAILED) {
850
+ s1 = null;
756
851
  }
757
- s1 = [s1, s2];
852
+ peg$savedPos = s0;
853
+ s1 = peg$f6();
758
854
  s0 = s1;
855
+ }
856
+
857
+ return s0;
858
+ }
859
+
860
+ function peg$parseclosingParen() {
861
+ var s0, s1;
862
+
863
+ if (input.charCodeAt(peg$currPos) === 41) {
864
+ s0 = peg$c5;
865
+ peg$currPos++;
759
866
  } else {
760
- peg$currPos = s0;
761
867
  s0 = peg$FAILED;
868
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
869
+ }
870
+ if (s0 === peg$FAILED) {
871
+ s0 = peg$currPos;
872
+ if (input.length > peg$currPos) {
873
+ s1 = input.charAt(peg$currPos);
874
+ peg$currPos++;
875
+ } else {
876
+ s1 = peg$FAILED;
877
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
878
+ }
879
+ if (s1 === peg$FAILED) {
880
+ s1 = null;
881
+ }
882
+ peg$savedPos = s0;
883
+ s1 = peg$f7();
884
+ s0 = s1;
885
+ }
886
+
887
+ return s0;
888
+ }
889
+
890
+ function peg$parsecomment() {
891
+ var s0, s1;
892
+
893
+ peg$silentFails++;
894
+ s0 = peg$parsemultiLineComment();
895
+ if (s0 === peg$FAILED) {
896
+ s0 = peg$parsesingleLineComment();
762
897
  }
763
898
  peg$silentFails--;
764
899
  if (s0 === peg$FAILED) {
765
900
  s1 = peg$FAILED;
766
- if (peg$silentFails === 0) { peg$fail(peg$e8); }
901
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
767
902
  }
768
903
 
769
904
  return s0;
@@ -774,22 +909,22 @@ function peg$parse(input, options) {
774
909
 
775
910
  s0 = peg$currPos;
776
911
  s1 = [];
777
- if (peg$r1.test(input.charAt(peg$currPos))) {
912
+ if (peg$r0.test(input.charAt(peg$currPos))) {
778
913
  s2 = input.charAt(peg$currPos);
779
914
  peg$currPos++;
780
915
  } else {
781
916
  s2 = peg$FAILED;
782
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
917
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
783
918
  }
784
919
  if (s2 !== peg$FAILED) {
785
920
  while (s2 !== peg$FAILED) {
786
921
  s1.push(s2);
787
- if (peg$r1.test(input.charAt(peg$currPos))) {
922
+ if (peg$r0.test(input.charAt(peg$currPos))) {
788
923
  s2 = input.charAt(peg$currPos);
789
924
  peg$currPos++;
790
925
  } else {
791
926
  s2 = peg$FAILED;
792
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
927
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
793
928
  }
794
929
  }
795
930
  } else {
@@ -805,17 +940,40 @@ function peg$parse(input, options) {
805
940
  return s0;
806
941
  }
807
942
 
943
+ function peg$parsedoubleArrow() {
944
+ var s0;
945
+
946
+ if (input.charCodeAt(peg$currPos) === 8658) {
947
+ s0 = peg$c6;
948
+ peg$currPos++;
949
+ } else {
950
+ s0 = peg$FAILED;
951
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
952
+ }
953
+ if (s0 === peg$FAILED) {
954
+ if (input.substr(peg$currPos, 2) === peg$c7) {
955
+ s0 = peg$c7;
956
+ peg$currPos += 2;
957
+ } else {
958
+ s0 = peg$FAILED;
959
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
960
+ }
961
+ }
962
+
963
+ return s0;
964
+ }
965
+
808
966
  function peg$parsedoubleQuoteString() {
809
967
  var s0, s1, s2, s3;
810
968
 
811
969
  peg$silentFails++;
812
970
  s0 = peg$currPos;
813
971
  if (input.charCodeAt(peg$currPos) === 34) {
814
- s1 = peg$c4;
972
+ s1 = peg$c8;
815
973
  peg$currPos++;
816
974
  } else {
817
975
  s1 = peg$FAILED;
818
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
976
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
819
977
  }
820
978
  if (s1 !== peg$FAILED) {
821
979
  s2 = [];
@@ -825,15 +983,15 @@ function peg$parse(input, options) {
825
983
  s3 = peg$parsedoubleQuoteStringChar();
826
984
  }
827
985
  if (input.charCodeAt(peg$currPos) === 34) {
828
- s3 = peg$c4;
986
+ s3 = peg$c8;
829
987
  peg$currPos++;
830
988
  } else {
831
989
  s3 = peg$FAILED;
832
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
990
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
833
991
  }
834
992
  if (s3 !== peg$FAILED) {
835
993
  peg$savedPos = s0;
836
- s0 = peg$f5(s2);
994
+ s0 = peg$f8(s2);
837
995
  } else {
838
996
  peg$currPos = s0;
839
997
  s0 = peg$FAILED;
@@ -845,7 +1003,7 @@ function peg$parse(input, options) {
845
1003
  peg$silentFails--;
846
1004
  if (s0 === peg$FAILED) {
847
1005
  s1 = peg$FAILED;
848
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1006
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
849
1007
  }
850
1008
 
851
1009
  return s0;
@@ -858,11 +1016,11 @@ function peg$parse(input, options) {
858
1016
  s1 = peg$currPos;
859
1017
  peg$silentFails++;
860
1018
  if (input.charCodeAt(peg$currPos) === 34) {
861
- s2 = peg$c4;
1019
+ s2 = peg$c8;
862
1020
  peg$currPos++;
863
1021
  } else {
864
1022
  s2 = peg$FAILED;
865
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
1023
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
866
1024
  }
867
1025
  if (s2 === peg$FAILED) {
868
1026
  s2 = peg$parsenewLine();
@@ -896,11 +1054,11 @@ function peg$parse(input, options) {
896
1054
  peg$silentFails++;
897
1055
  s0 = peg$currPos;
898
1056
  if (input.charCodeAt(peg$currPos) === 92) {
899
- s1 = peg$c5;
1057
+ s1 = peg$c9;
900
1058
  peg$currPos++;
901
1059
  } else {
902
1060
  s1 = peg$FAILED;
903
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1061
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
904
1062
  }
905
1063
  if (s1 !== peg$FAILED) {
906
1064
  if (input.length > peg$currPos) {
@@ -908,7 +1066,7 @@ function peg$parse(input, options) {
908
1066
  peg$currPos++;
909
1067
  } else {
910
1068
  s2 = peg$FAILED;
911
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1069
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
912
1070
  }
913
1071
  if (s2 !== peg$FAILED) {
914
1072
  s0 = s2;
@@ -923,72 +1081,27 @@ function peg$parse(input, options) {
923
1081
  peg$silentFails--;
924
1082
  if (s0 === peg$FAILED) {
925
1083
  s1 = peg$FAILED;
926
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1084
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
927
1085
  }
928
1086
 
929
1087
  return s0;
930
1088
  }
931
1089
 
932
1090
  function peg$parseexpr() {
933
- var s0, s1;
934
-
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
- }
981
-
982
- return s0;
983
- }
984
-
985
- function peg$parseexpression() {
986
- var s0, s1, s2, s3;
1091
+ var s0;
1092
+
1093
+ s0 = peg$parsepipeline();
1094
+
1095
+ return s0;
1096
+ }
1097
+
1098
+ function peg$parseexpression() {
1099
+ var s0, s1, s2, s3;
987
1100
 
988
1101
  peg$silentFails++;
989
1102
  s0 = peg$currPos;
990
1103
  s1 = peg$parse__();
991
- s2 = peg$parseexpr();
1104
+ s2 = peg$parsepipeline();
992
1105
  if (s2 !== peg$FAILED) {
993
1106
  s3 = peg$parse__();
994
1107
  s0 = s2;
@@ -999,7 +1112,7 @@ function peg$parse(input, options) {
999
1112
  peg$silentFails--;
1000
1113
  if (s0 === peg$FAILED) {
1001
1114
  s1 = peg$FAILED;
1002
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
1115
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1003
1116
  }
1004
1117
 
1005
1118
  return s0;
@@ -1019,17 +1132,17 @@ function peg$parse(input, options) {
1019
1132
  s2 = null;
1020
1133
  }
1021
1134
  if (input.charCodeAt(peg$currPos) === 46) {
1022
- s3 = peg$c6;
1135
+ s3 = peg$c10;
1023
1136
  peg$currPos++;
1024
1137
  } else {
1025
1138
  s3 = peg$FAILED;
1026
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1139
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1027
1140
  }
1028
1141
  if (s3 !== peg$FAILED) {
1029
1142
  s4 = peg$parsedigits();
1030
1143
  if (s4 !== peg$FAILED) {
1031
1144
  peg$savedPos = s0;
1032
- s0 = peg$f6();
1145
+ s0 = peg$f9();
1033
1146
  } else {
1034
1147
  peg$currPos = s0;
1035
1148
  s0 = peg$FAILED;
@@ -1041,7 +1154,7 @@ function peg$parse(input, options) {
1041
1154
  peg$silentFails--;
1042
1155
  if (s0 === peg$FAILED) {
1043
1156
  s1 = peg$FAILED;
1044
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
1157
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1045
1158
  }
1046
1159
 
1047
1160
  return s0;
@@ -1056,21 +1169,16 @@ function peg$parse(input, options) {
1056
1169
  if (s1 !== peg$FAILED) {
1057
1170
  s2 = [];
1058
1171
  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;
1172
+ while (s3 !== peg$FAILED) {
1173
+ s2.push(s3);
1174
+ s3 = peg$parseargs();
1066
1175
  }
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;
1176
+ s3 = peg$parseimplicitParensArgs();
1177
+ if (s3 === peg$FAILED) {
1178
+ s3 = null;
1073
1179
  }
1180
+ peg$savedPos = s0;
1181
+ s0 = peg$f10(s1, s2, s3);
1074
1182
  } else {
1075
1183
  peg$currPos = s0;
1076
1184
  s0 = peg$FAILED;
@@ -1078,7 +1186,7 @@ function peg$parse(input, options) {
1078
1186
  peg$silentFails--;
1079
1187
  if (s0 === peg$FAILED) {
1080
1188
  s1 = peg$FAILED;
1081
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
1189
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1082
1190
  }
1083
1191
 
1084
1192
  return s0;
@@ -1090,24 +1198,18 @@ function peg$parse(input, options) {
1090
1198
  peg$silentFails++;
1091
1199
  s0 = peg$currPos;
1092
1200
  if (input.charCodeAt(peg$currPos) === 40) {
1093
- s1 = peg$c7;
1201
+ s1 = peg$c11;
1094
1202
  peg$currPos++;
1095
1203
  } else {
1096
1204
  s1 = peg$FAILED;
1097
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1205
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1098
1206
  }
1099
1207
  if (s1 !== peg$FAILED) {
1100
1208
  s2 = peg$parse__();
1101
- s3 = peg$parseexpr();
1209
+ s3 = peg$parsepipeline();
1102
1210
  if (s3 !== peg$FAILED) {
1103
1211
  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
- }
1212
+ s5 = peg$parseclosingParen();
1111
1213
  if (s5 !== peg$FAILED) {
1112
1214
  s0 = s3;
1113
1215
  } else {
@@ -1125,7 +1227,53 @@ function peg$parse(input, options) {
1125
1227
  peg$silentFails--;
1126
1228
  if (s0 === peg$FAILED) {
1127
1229
  s1 = peg$FAILED;
1128
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
1230
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1231
+ }
1232
+
1233
+ return s0;
1234
+ }
1235
+
1236
+ function peg$parsehost() {
1237
+ var s0, s1, s2, s3, s4;
1238
+
1239
+ peg$silentFails++;
1240
+ s0 = peg$currPos;
1241
+ s1 = peg$parseidentifier();
1242
+ if (s1 !== peg$FAILED) {
1243
+ s2 = peg$currPos;
1244
+ if (input.charCodeAt(peg$currPos) === 58) {
1245
+ s3 = peg$c12;
1246
+ peg$currPos++;
1247
+ } else {
1248
+ s3 = peg$FAILED;
1249
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1250
+ }
1251
+ if (s3 !== peg$FAILED) {
1252
+ s4 = peg$parsenumber();
1253
+ if (s4 !== peg$FAILED) {
1254
+ s3 = [s3, s4];
1255
+ s2 = s3;
1256
+ } else {
1257
+ peg$currPos = s2;
1258
+ s2 = peg$FAILED;
1259
+ }
1260
+ } else {
1261
+ peg$currPos = s2;
1262
+ s2 = peg$FAILED;
1263
+ }
1264
+ if (s2 === peg$FAILED) {
1265
+ s2 = null;
1266
+ }
1267
+ peg$savedPos = s0;
1268
+ s0 = peg$f11();
1269
+ } else {
1270
+ peg$currPos = s0;
1271
+ s0 = peg$FAILED;
1272
+ }
1273
+ peg$silentFails--;
1274
+ if (s0 === peg$FAILED) {
1275
+ s1 = peg$FAILED;
1276
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1129
1277
  }
1130
1278
 
1131
1279
  return s0;
@@ -1148,79 +1296,107 @@ function peg$parse(input, options) {
1148
1296
  }
1149
1297
  if (s1 !== peg$FAILED) {
1150
1298
  peg$savedPos = s0;
1151
- s1 = peg$f8(s1);
1299
+ s1 = peg$f12(s1);
1152
1300
  }
1153
1301
  s0 = s1;
1154
1302
  peg$silentFails--;
1155
1303
  if (s0 === peg$FAILED) {
1156
1304
  s1 = peg$FAILED;
1157
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
1305
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1158
1306
  }
1159
1307
 
1160
1308
  return s0;
1161
1309
  }
1162
1310
 
1163
1311
  function peg$parseidentifierChar() {
1164
- var s0;
1312
+ var s0, s1, s2, s3;
1165
1313
 
1166
- if (peg$r2.test(input.charAt(peg$currPos))) {
1314
+ if (peg$r1.test(input.charAt(peg$currPos))) {
1167
1315
  s0 = input.charAt(peg$currPos);
1168
1316
  peg$currPos++;
1169
1317
  } else {
1170
1318
  s0 = peg$FAILED;
1171
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
1319
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1172
1320
  }
1173
1321
  if (s0 === peg$FAILED) {
1174
- s0 = peg$parseescapedChar();
1322
+ s0 = peg$currPos;
1323
+ if (input.charCodeAt(peg$currPos) === 45) {
1324
+ s1 = peg$c13;
1325
+ peg$currPos++;
1326
+ } else {
1327
+ s1 = peg$FAILED;
1328
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1329
+ }
1330
+ if (s1 !== peg$FAILED) {
1331
+ s2 = peg$currPos;
1332
+ peg$silentFails++;
1333
+ if (input.charCodeAt(peg$currPos) === 62) {
1334
+ s3 = peg$c14;
1335
+ peg$currPos++;
1336
+ } else {
1337
+ s3 = peg$FAILED;
1338
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1339
+ }
1340
+ peg$silentFails--;
1341
+ if (s3 === peg$FAILED) {
1342
+ s2 = undefined;
1343
+ } else {
1344
+ peg$currPos = s2;
1345
+ s2 = peg$FAILED;
1346
+ }
1347
+ if (s2 !== peg$FAILED) {
1348
+ s0 = s1;
1349
+ } else {
1350
+ peg$currPos = s0;
1351
+ s0 = peg$FAILED;
1352
+ }
1353
+ } else {
1354
+ peg$currPos = s0;
1355
+ s0 = peg$FAILED;
1356
+ }
1357
+ if (s0 === peg$FAILED) {
1358
+ s0 = peg$parseescapedChar();
1359
+ }
1175
1360
  }
1176
1361
 
1177
1362
  return s0;
1178
1363
  }
1179
1364
 
1180
1365
  function peg$parseidentifierList() {
1181
- var s0, s1, s2, s3, s4, s5;
1366
+ var s0, s1, s2, s3, s4;
1182
1367
 
1183
1368
  s0 = peg$currPos;
1184
- s1 = peg$parseidentifier();
1185
- if (s1 !== peg$FAILED) {
1186
- s2 = [];
1369
+ s1 = peg$currPos;
1370
+ s2 = [];
1371
+ s3 = peg$parseidentifier();
1372
+ while (s3 !== peg$FAILED) {
1373
+ s2.push(s3);
1187
1374
  s3 = peg$currPos;
1188
1375
  s4 = peg$parseseparator();
1189
1376
  if (s4 !== peg$FAILED) {
1190
- s5 = peg$parseidentifier();
1191
- if (s5 !== peg$FAILED) {
1192
- s3 = s5;
1193
- } else {
1377
+ s4 = peg$parseidentifier();
1378
+ if (s4 === peg$FAILED) {
1194
1379
  peg$currPos = s3;
1195
1380
  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
1381
  } else {
1214
- peg$currPos = s3;
1215
- s3 = peg$FAILED;
1382
+ s3 = s4;
1216
1383
  }
1384
+ } else {
1385
+ s3 = s4;
1217
1386
  }
1218
- s3 = peg$parseseparator();
1219
- if (s3 === peg$FAILED) {
1220
- s3 = null;
1387
+ }
1388
+ if (s2.length < 1) {
1389
+ peg$currPos = s1;
1390
+ s1 = peg$FAILED;
1391
+ } else {
1392
+ s1 = s2;
1393
+ }
1394
+ if (s1 !== peg$FAILED) {
1395
+ s2 = peg$parseseparator();
1396
+ if (s2 === peg$FAILED) {
1397
+ s2 = null;
1221
1398
  }
1222
- peg$savedPos = s0;
1223
- s0 = peg$f9(s1, s2);
1399
+ s0 = s1;
1224
1400
  } else {
1225
1401
  peg$currPos = s0;
1226
1402
  s0 = peg$FAILED;
@@ -1229,85 +1405,29 @@ function peg$parse(input, options) {
1229
1405
  return s0;
1230
1406
  }
1231
1407
 
1232
- function peg$parseimplicitParensCall() {
1233
- var s0, s1, s2, s3;
1408
+ function peg$parseimplicitParensArgs() {
1409
+ var s0, s1, s2;
1234
1410
 
1235
1411
  peg$silentFails++;
1236
1412
  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;
1413
+ s1 = [];
1414
+ s2 = peg$parseinlineSpace();
1415
+ if (s2 !== peg$FAILED) {
1416
+ while (s2 !== peg$FAILED) {
1417
+ s1.push(s2);
1418
+ s2 = peg$parseinlineSpace();
1264
1419
  }
1265
1420
  } else {
1266
- peg$currPos = s0;
1267
- s0 = peg$FAILED;
1268
- }
1269
- peg$silentFails--;
1270
- if (s0 === peg$FAILED) {
1271
1421
  s1 = peg$FAILED;
1272
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
1273
1422
  }
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
1423
  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
- }
1424
+ s2 = peg$parselist();
1425
+ if (s2 !== peg$FAILED) {
1426
+ s0 = s2;
1302
1427
  } else {
1303
- peg$currPos = s2;
1304
- s2 = peg$FAILED;
1305
- }
1306
- if (s2 === peg$FAILED) {
1307
- s2 = null;
1428
+ peg$currPos = s0;
1429
+ s0 = peg$FAILED;
1308
1430
  }
1309
- peg$savedPos = s0;
1310
- s0 = peg$f11();
1311
1431
  } else {
1312
1432
  peg$currPos = s0;
1313
1433
  s0 = peg$FAILED;
@@ -1315,7 +1435,7 @@ function peg$parse(input, options) {
1315
1435
  peg$silentFails--;
1316
1436
  if (s0 === peg$FAILED) {
1317
1437
  s1 = peg$FAILED;
1318
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
1438
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1319
1439
  }
1320
1440
 
1321
1441
  return s0;
@@ -1324,12 +1444,12 @@ function peg$parse(input, options) {
1324
1444
  function peg$parseinlineSpace() {
1325
1445
  var s0;
1326
1446
 
1327
- if (peg$r3.test(input.charAt(peg$currPos))) {
1447
+ if (peg$r2.test(input.charAt(peg$currPos))) {
1328
1448
  s0 = input.charAt(peg$currPos);
1329
1449
  peg$currPos++;
1330
1450
  } else {
1331
1451
  s0 = peg$FAILED;
1332
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
1452
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1333
1453
  }
1334
1454
 
1335
1455
  return s0;
@@ -1347,7 +1467,7 @@ function peg$parse(input, options) {
1347
1467
  s2 = peg$parsedigits();
1348
1468
  if (s2 !== peg$FAILED) {
1349
1469
  peg$savedPos = s0;
1350
- s0 = peg$f12();
1470
+ s0 = peg$f13();
1351
1471
  } else {
1352
1472
  peg$currPos = s0;
1353
1473
  s0 = peg$FAILED;
@@ -1355,7 +1475,7 @@ function peg$parse(input, options) {
1355
1475
  peg$silentFails--;
1356
1476
  if (s0 === peg$FAILED) {
1357
1477
  s1 = peg$FAILED;
1358
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
1478
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1359
1479
  }
1360
1480
 
1361
1481
  return s0;
@@ -1367,18 +1487,18 @@ function peg$parse(input, options) {
1367
1487
  peg$silentFails++;
1368
1488
  s0 = peg$currPos;
1369
1489
  if (input.charCodeAt(peg$currPos) === 61) {
1370
- s1 = peg$c0;
1490
+ s1 = peg$c2;
1371
1491
  peg$currPos++;
1372
1492
  } else {
1373
1493
  s1 = peg$FAILED;
1374
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
1494
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
1375
1495
  }
1376
1496
  if (s1 !== peg$FAILED) {
1377
1497
  s2 = peg$parse__();
1378
- s3 = peg$parseexpr();
1498
+ s3 = peg$parsepipeline();
1379
1499
  if (s3 !== peg$FAILED) {
1380
1500
  peg$savedPos = s0;
1381
- s0 = peg$f13(s3);
1501
+ s0 = peg$f14(s3);
1382
1502
  } else {
1383
1503
  peg$currPos = s0;
1384
1504
  s0 = peg$FAILED;
@@ -1390,7 +1510,7 @@ function peg$parse(input, options) {
1390
1510
  peg$silentFails--;
1391
1511
  if (s0 === peg$FAILED) {
1392
1512
  s1 = peg$FAILED;
1393
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
1513
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1394
1514
  }
1395
1515
 
1396
1516
  return s0;
@@ -1402,20 +1522,15 @@ function peg$parse(input, options) {
1402
1522
  peg$silentFails++;
1403
1523
  s0 = peg$currPos;
1404
1524
  if (input.charCodeAt(peg$currPos) === 47) {
1405
- s1 = peg$c10;
1525
+ s1 = peg$c15;
1406
1526
  peg$currPos++;
1407
1527
  } else {
1408
1528
  s1 = peg$FAILED;
1409
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1529
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1410
1530
  }
1411
1531
  if (s1 !== peg$FAILED) {
1412
1532
  s2 = peg$parsepath();
1413
- if (s2 !== peg$FAILED) {
1414
- s0 = s2;
1415
- } else {
1416
- peg$currPos = s0;
1417
- s0 = peg$FAILED;
1418
- }
1533
+ s0 = s2;
1419
1534
  } else {
1420
1535
  peg$currPos = s0;
1421
1536
  s0 = peg$FAILED;
@@ -1423,41 +1538,117 @@ function peg$parse(input, options) {
1423
1538
  if (s0 === peg$FAILED) {
1424
1539
  s0 = peg$currPos;
1425
1540
  if (input.charCodeAt(peg$currPos) === 47) {
1426
- s1 = peg$c10;
1541
+ s1 = peg$c15;
1427
1542
  peg$currPos++;
1428
1543
  } else {
1429
1544
  s1 = peg$FAILED;
1430
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1545
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1431
1546
  }
1432
1547
  if (s1 !== peg$FAILED) {
1433
1548
  peg$savedPos = s0;
1434
- s1 = peg$f14();
1549
+ s1 = peg$f15();
1435
1550
  }
1436
1551
  s0 = s1;
1437
1552
  }
1438
1553
  peg$silentFails--;
1439
1554
  if (s0 === peg$FAILED) {
1440
1555
  s1 = peg$FAILED;
1441
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
1556
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
1442
1557
  }
1443
1558
 
1444
1559
  return s0;
1445
1560
  }
1446
1561
 
1447
1562
  function peg$parselist() {
1448
- var s0, s1, s2, s3, s4, s5;
1563
+ var s0, s1, s2, s3, s4;
1449
1564
 
1450
1565
  peg$silentFails++;
1451
1566
  s0 = peg$currPos;
1452
- s1 = peg$parseexpr();
1567
+ s1 = peg$currPos;
1568
+ s2 = [];
1569
+ s3 = peg$parsepipeline();
1570
+ while (s3 !== peg$FAILED) {
1571
+ s2.push(s3);
1572
+ s3 = peg$currPos;
1573
+ s4 = peg$parseseparator();
1574
+ if (s4 !== peg$FAILED) {
1575
+ s4 = peg$parsepipeline();
1576
+ if (s4 === peg$FAILED) {
1577
+ peg$currPos = s3;
1578
+ s3 = peg$FAILED;
1579
+ } else {
1580
+ s3 = s4;
1581
+ }
1582
+ } else {
1583
+ s3 = s4;
1584
+ }
1585
+ }
1586
+ if (s2.length < 1) {
1587
+ peg$currPos = s1;
1588
+ s1 = peg$FAILED;
1589
+ } else {
1590
+ s1 = s2;
1591
+ }
1592
+ if (s1 !== peg$FAILED) {
1593
+ s2 = peg$parseseparator();
1594
+ if (s2 === peg$FAILED) {
1595
+ s2 = null;
1596
+ }
1597
+ s0 = s1;
1598
+ } else {
1599
+ peg$currPos = s0;
1600
+ s0 = peg$FAILED;
1601
+ }
1602
+ peg$silentFails--;
1603
+ if (s0 === peg$FAILED) {
1604
+ s1 = peg$FAILED;
1605
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1606
+ }
1607
+
1608
+ return s0;
1609
+ }
1610
+
1611
+ function peg$parsemultiLineComment() {
1612
+ var s0, s1, s2, s3, s4, s5;
1613
+
1614
+ s0 = peg$currPos;
1615
+ if (input.substr(peg$currPos, 2) === peg$c16) {
1616
+ s1 = peg$c16;
1617
+ peg$currPos += 2;
1618
+ } else {
1619
+ s1 = peg$FAILED;
1620
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
1621
+ }
1453
1622
  if (s1 !== peg$FAILED) {
1454
1623
  s2 = [];
1455
1624
  s3 = peg$currPos;
1456
- s4 = peg$parseseparator();
1625
+ s4 = peg$currPos;
1626
+ peg$silentFails++;
1627
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1628
+ s5 = peg$c17;
1629
+ peg$currPos += 2;
1630
+ } else {
1631
+ s5 = peg$FAILED;
1632
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1633
+ }
1634
+ peg$silentFails--;
1635
+ if (s5 === peg$FAILED) {
1636
+ s4 = undefined;
1637
+ } else {
1638
+ peg$currPos = s4;
1639
+ s4 = peg$FAILED;
1640
+ }
1457
1641
  if (s4 !== peg$FAILED) {
1458
- s5 = peg$parseexpr();
1642
+ if (input.length > peg$currPos) {
1643
+ s5 = input.charAt(peg$currPos);
1644
+ peg$currPos++;
1645
+ } else {
1646
+ s5 = peg$FAILED;
1647
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1648
+ }
1459
1649
  if (s5 !== peg$FAILED) {
1460
- s3 = s5;
1650
+ s4 = [s4, s5];
1651
+ s3 = s4;
1461
1652
  } else {
1462
1653
  peg$currPos = s3;
1463
1654
  s3 = peg$FAILED;
@@ -1469,11 +1660,33 @@ function peg$parse(input, options) {
1469
1660
  while (s3 !== peg$FAILED) {
1470
1661
  s2.push(s3);
1471
1662
  s3 = peg$currPos;
1472
- s4 = peg$parseseparator();
1663
+ s4 = peg$currPos;
1664
+ peg$silentFails++;
1665
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1666
+ s5 = peg$c17;
1667
+ peg$currPos += 2;
1668
+ } else {
1669
+ s5 = peg$FAILED;
1670
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1671
+ }
1672
+ peg$silentFails--;
1673
+ if (s5 === peg$FAILED) {
1674
+ s4 = undefined;
1675
+ } else {
1676
+ peg$currPos = s4;
1677
+ s4 = peg$FAILED;
1678
+ }
1473
1679
  if (s4 !== peg$FAILED) {
1474
- s5 = peg$parseexpr();
1680
+ if (input.length > peg$currPos) {
1681
+ s5 = input.charAt(peg$currPos);
1682
+ peg$currPos++;
1683
+ } else {
1684
+ s5 = peg$FAILED;
1685
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1686
+ }
1475
1687
  if (s5 !== peg$FAILED) {
1476
- s3 = s5;
1688
+ s4 = [s4, s5];
1689
+ s3 = s4;
1477
1690
  } else {
1478
1691
  peg$currPos = s3;
1479
1692
  s3 = peg$FAILED;
@@ -1483,21 +1696,24 @@ function peg$parse(input, options) {
1483
1696
  s3 = peg$FAILED;
1484
1697
  }
1485
1698
  }
1486
- s3 = peg$parseseparator();
1487
- if (s3 === peg$FAILED) {
1488
- s3 = null;
1699
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1700
+ s3 = peg$c17;
1701
+ peg$currPos += 2;
1702
+ } else {
1703
+ s3 = peg$FAILED;
1704
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1705
+ }
1706
+ if (s3 !== peg$FAILED) {
1707
+ peg$savedPos = s0;
1708
+ s0 = peg$f16();
1709
+ } else {
1710
+ peg$currPos = s0;
1711
+ s0 = peg$FAILED;
1489
1712
  }
1490
- peg$savedPos = s0;
1491
- s0 = peg$f15(s1, s2);
1492
1713
  } else {
1493
1714
  peg$currPos = s0;
1494
1715
  s0 = peg$FAILED;
1495
1716
  }
1496
- peg$silentFails--;
1497
- if (s0 === peg$FAILED) {
1498
- s1 = peg$FAILED;
1499
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1500
- }
1501
1717
 
1502
1718
  return s0;
1503
1719
  }
@@ -1506,27 +1722,27 @@ function peg$parse(input, options) {
1506
1722
  var s0;
1507
1723
 
1508
1724
  if (input.charCodeAt(peg$currPos) === 10) {
1509
- s0 = peg$c11;
1725
+ s0 = peg$c18;
1510
1726
  peg$currPos++;
1511
1727
  } else {
1512
1728
  s0 = peg$FAILED;
1513
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
1729
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
1514
1730
  }
1515
1731
  if (s0 === peg$FAILED) {
1516
- if (input.substr(peg$currPos, 2) === peg$c12) {
1517
- s0 = peg$c12;
1732
+ if (input.substr(peg$currPos, 2) === peg$c19) {
1733
+ s0 = peg$c19;
1518
1734
  peg$currPos += 2;
1519
1735
  } else {
1520
1736
  s0 = peg$FAILED;
1521
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
1737
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
1522
1738
  }
1523
1739
  if (s0 === peg$FAILED) {
1524
1740
  if (input.charCodeAt(peg$currPos) === 13) {
1525
- s0 = peg$c13;
1741
+ s0 = peg$c20;
1526
1742
  peg$currPos++;
1527
1743
  } else {
1528
1744
  s0 = peg$FAILED;
1529
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
1745
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
1530
1746
  }
1531
1747
  }
1532
1748
  }
@@ -1545,23 +1761,23 @@ function peg$parse(input, options) {
1545
1761
  peg$silentFails--;
1546
1762
  if (s0 === peg$FAILED) {
1547
1763
  s1 = peg$FAILED;
1548
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
1764
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
1549
1765
  }
1550
1766
 
1551
1767
  return s0;
1552
1768
  }
1553
1769
 
1554
1770
  function peg$parseobject() {
1555
- var s0, s1, s2, s3, s4;
1771
+ var s0, s1, s2, s3, s4, s5;
1556
1772
 
1557
1773
  peg$silentFails++;
1558
1774
  s0 = peg$currPos;
1559
1775
  if (input.charCodeAt(peg$currPos) === 123) {
1560
- s1 = peg$c14;
1776
+ s1 = peg$c21;
1561
1777
  peg$currPos++;
1562
1778
  } else {
1563
1779
  s1 = peg$FAILED;
1564
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
1780
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
1565
1781
  }
1566
1782
  if (s1 !== peg$FAILED) {
1567
1783
  s2 = peg$parse__();
@@ -1569,16 +1785,17 @@ function peg$parse(input, options) {
1569
1785
  if (s3 === peg$FAILED) {
1570
1786
  s3 = null;
1571
1787
  }
1788
+ s4 = peg$parse__();
1572
1789
  if (input.charCodeAt(peg$currPos) === 125) {
1573
- s4 = peg$c15;
1790
+ s5 = peg$c3;
1574
1791
  peg$currPos++;
1575
1792
  } else {
1576
- s4 = peg$FAILED;
1577
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
1793
+ s5 = peg$FAILED;
1794
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
1578
1795
  }
1579
- if (s4 !== peg$FAILED) {
1796
+ if (s5 !== peg$FAILED) {
1580
1797
  peg$savedPos = s0;
1581
- s0 = peg$f16(s3);
1798
+ s0 = peg$f17(s3);
1582
1799
  } else {
1583
1800
  peg$currPos = s0;
1584
1801
  s0 = peg$FAILED;
@@ -1590,57 +1807,47 @@ function peg$parse(input, options) {
1590
1807
  peg$silentFails--;
1591
1808
  if (s0 === peg$FAILED) {
1592
1809
  s1 = peg$FAILED;
1593
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
1810
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
1594
1811
  }
1595
1812
 
1596
1813
  return s0;
1597
1814
  }
1598
1815
 
1599
1816
  function peg$parseobjectProperties() {
1600
- var s0, s1, s2, s3, s4, s5;
1817
+ var s0, s1, s2, s3, s4;
1601
1818
 
1602
1819
  s0 = peg$currPos;
1603
- s1 = peg$parseobjectPropertyOrShorthand();
1604
- if (s1 !== peg$FAILED) {
1605
- s2 = [];
1820
+ s1 = peg$currPos;
1821
+ s2 = [];
1822
+ s3 = peg$parseobjectPropertyOrShorthand();
1823
+ while (s3 !== peg$FAILED) {
1824
+ s2.push(s3);
1606
1825
  s3 = peg$currPos;
1607
1826
  s4 = peg$parseseparator();
1608
1827
  if (s4 !== peg$FAILED) {
1609
- s5 = peg$parseobjectPropertyOrShorthand();
1610
- if (s5 !== peg$FAILED) {
1611
- s3 = s5;
1612
- } else {
1828
+ s4 = peg$parseobjectPropertyOrShorthand();
1829
+ if (s4 === peg$FAILED) {
1613
1830
  peg$currPos = s3;
1614
1831
  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
1832
  } else {
1633
- peg$currPos = s3;
1634
- s3 = peg$FAILED;
1833
+ s3 = s4;
1635
1834
  }
1835
+ } else {
1836
+ s3 = s4;
1636
1837
  }
1637
- s3 = peg$parseseparator();
1638
- if (s3 === peg$FAILED) {
1639
- s3 = null;
1838
+ }
1839
+ if (s2.length < 1) {
1840
+ peg$currPos = s1;
1841
+ s1 = peg$FAILED;
1842
+ } else {
1843
+ s1 = s2;
1844
+ }
1845
+ if (s1 !== peg$FAILED) {
1846
+ s2 = peg$parseseparator();
1847
+ if (s2 === peg$FAILED) {
1848
+ s2 = null;
1640
1849
  }
1641
- s4 = peg$parse__();
1642
- peg$savedPos = s0;
1643
- s0 = peg$f17(s1, s2);
1850
+ s0 = s1;
1644
1851
  } else {
1645
1852
  peg$currPos = s0;
1646
1853
  s0 = peg$FAILED;
@@ -1658,15 +1865,15 @@ function peg$parse(input, options) {
1658
1865
  if (s1 !== peg$FAILED) {
1659
1866
  s2 = peg$parse__();
1660
1867
  if (input.charCodeAt(peg$currPos) === 58) {
1661
- s3 = peg$c9;
1868
+ s3 = peg$c12;
1662
1869
  peg$currPos++;
1663
1870
  } else {
1664
1871
  s3 = peg$FAILED;
1665
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1872
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1666
1873
  }
1667
1874
  if (s3 !== peg$FAILED) {
1668
1875
  s4 = peg$parse__();
1669
- s5 = peg$parseexpr();
1876
+ s5 = peg$parsepipeline();
1670
1877
  if (s5 !== peg$FAILED) {
1671
1878
  s0 = [ s1, s5 ];
1672
1879
  } else {
@@ -1684,7 +1891,7 @@ function peg$parse(input, options) {
1684
1891
  peg$silentFails--;
1685
1892
  if (s0 === peg$FAILED) {
1686
1893
  s1 = peg$FAILED;
1687
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
1894
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
1688
1895
  }
1689
1896
 
1690
1897
  return s0;
@@ -1708,15 +1915,15 @@ function peg$parse(input, options) {
1708
1915
  }
1709
1916
 
1710
1917
  function peg$parseparameterizedLambda() {
1711
- var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1918
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1712
1919
 
1713
1920
  s0 = peg$currPos;
1714
1921
  if (input.charCodeAt(peg$currPos) === 40) {
1715
- s1 = peg$c7;
1922
+ s1 = peg$c11;
1716
1923
  peg$currPos++;
1717
1924
  } else {
1718
1925
  s1 = peg$FAILED;
1719
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1926
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1720
1927
  }
1721
1928
  if (s1 !== peg$FAILED) {
1722
1929
  s2 = peg$parse__();
@@ -1724,37 +1931,23 @@ function peg$parse(input, options) {
1724
1931
  if (s3 === peg$FAILED) {
1725
1932
  s3 = null;
1726
1933
  }
1934
+ s4 = peg$parse__();
1727
1935
  if (input.charCodeAt(peg$currPos) === 41) {
1728
- s4 = peg$c8;
1936
+ s5 = peg$c5;
1729
1937
  peg$currPos++;
1730
1938
  } 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) {
1939
+ s5 = peg$FAILED;
1940
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1941
+ }
1942
+ if (s5 !== peg$FAILED) {
1943
+ s6 = peg$parse__();
1944
+ s7 = peg$parsedoubleArrow();
1945
+ if (s7 !== peg$FAILED) {
1946
+ s8 = peg$parse__();
1947
+ s9 = peg$parsepipeline();
1948
+ if (s9 !== peg$FAILED) {
1756
1949
  peg$savedPos = s0;
1757
- s0 = peg$f19(s3, s8);
1950
+ s0 = peg$f19(s3, s9);
1758
1951
  } else {
1759
1952
  peg$currPos = s0;
1760
1953
  s0 = peg$FAILED;
@@ -1776,16 +1969,16 @@ function peg$parse(input, options) {
1776
1969
  }
1777
1970
 
1778
1971
  function peg$parseparensArgs() {
1779
- var s0, s1, s2, s3, s4;
1972
+ var s0, s1, s2, s3, s4, s5;
1780
1973
 
1781
1974
  peg$silentFails++;
1782
1975
  s0 = peg$currPos;
1783
1976
  if (input.charCodeAt(peg$currPos) === 40) {
1784
- s1 = peg$c7;
1977
+ s1 = peg$c11;
1785
1978
  peg$currPos++;
1786
1979
  } else {
1787
1980
  s1 = peg$FAILED;
1788
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1981
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1789
1982
  }
1790
1983
  if (s1 !== peg$FAILED) {
1791
1984
  s2 = peg$parse__();
@@ -1793,14 +1986,15 @@ function peg$parse(input, options) {
1793
1986
  if (s3 === peg$FAILED) {
1794
1987
  s3 = null;
1795
1988
  }
1989
+ s4 = peg$parse__();
1796
1990
  if (input.charCodeAt(peg$currPos) === 41) {
1797
- s4 = peg$c8;
1991
+ s5 = peg$c5;
1798
1992
  peg$currPos++;
1799
1993
  } else {
1800
- s4 = peg$FAILED;
1801
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
1994
+ s5 = peg$FAILED;
1995
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1802
1996
  }
1803
- if (s4 !== peg$FAILED) {
1997
+ if (s5 !== peg$FAILED) {
1804
1998
  peg$savedPos = s0;
1805
1999
  s0 = peg$f20(s3);
1806
2000
  } else {
@@ -1814,49 +2008,63 @@ function peg$parse(input, options) {
1814
2008
  peg$silentFails--;
1815
2009
  if (s0 === peg$FAILED) {
1816
2010
  s1 = peg$FAILED;
1817
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
2011
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
1818
2012
  }
1819
2013
 
1820
2014
  return s0;
1821
2015
  }
1822
2016
 
1823
- function peg$parseseparator() {
1824
- var s0, s1, s2, s3;
2017
+ function peg$parsepipeline() {
2018
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1825
2019
 
1826
2020
  s0 = peg$currPos;
1827
- s1 = peg$parse__();
1828
- if (input.charCodeAt(peg$currPos) === 44) {
1829
- s2 = peg$c18;
1830
- peg$currPos++;
1831
- } else {
2021
+ s1 = peg$currPos;
2022
+ s2 = peg$currPos;
2023
+ s3 = [];
2024
+ s4 = peg$parsestep();
2025
+ while (s4 !== peg$FAILED) {
2026
+ s3.push(s4);
2027
+ s4 = peg$currPos;
2028
+ s5 = peg$currPos;
2029
+ s6 = peg$parse__();
2030
+ s7 = peg$parsesingleArrow();
2031
+ if (s7 !== peg$FAILED) {
2032
+ s8 = peg$parse__();
2033
+ s6 = [s6, s7, s8];
2034
+ s5 = s6;
2035
+ } else {
2036
+ peg$currPos = s5;
2037
+ s5 = peg$FAILED;
2038
+ }
2039
+ if (s5 !== peg$FAILED) {
2040
+ s5 = peg$parsestep();
2041
+ if (s5 === peg$FAILED) {
2042
+ peg$currPos = s4;
2043
+ s4 = peg$FAILED;
2044
+ } else {
2045
+ s4 = s5;
2046
+ }
2047
+ } else {
2048
+ s4 = s5;
2049
+ }
2050
+ }
2051
+ if (s3.length < 1) {
2052
+ peg$currPos = s2;
1832
2053
  s2 = peg$FAILED;
1833
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
2054
+ } else {
2055
+ s2 = s3;
1834
2056
  }
1835
2057
  if (s2 !== peg$FAILED) {
1836
- s3 = peg$parse__();
1837
- s1 = [s1, s2, s3];
1838
- s0 = s1;
2058
+ s1 = s2;
1839
2059
  } else {
1840
- peg$currPos = s0;
1841
- s0 = peg$FAILED;
1842
- }
1843
- if (s0 === peg$FAILED) {
1844
- s0 = peg$parsewhitespaceWithNewLine();
2060
+ peg$currPos = s1;
2061
+ s1 = peg$FAILED;
1845
2062
  }
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); }
2063
+ if (s1 !== peg$FAILED) {
2064
+ peg$savedPos = s0;
2065
+ s1 = peg$f21(s1);
1859
2066
  }
2067
+ s0 = s1;
1860
2068
 
1861
2069
  return s0;
1862
2070
  }
@@ -1866,39 +2074,34 @@ function peg$parse(input, options) {
1866
2074
 
1867
2075
  peg$silentFails++;
1868
2076
  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();
2077
+ s1 = [];
2078
+ s2 = peg$parsepathKey();
2079
+ while (s2 !== peg$FAILED) {
2080
+ s1.push(s2);
2081
+ s2 = peg$currPos;
2082
+ if (input.charCodeAt(peg$currPos) === 47) {
2083
+ s3 = peg$c15;
2084
+ peg$currPos++;
2085
+ } else {
2086
+ s3 = peg$FAILED;
2087
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
2088
+ }
1879
2089
  if (s3 !== peg$FAILED) {
1880
- peg$savedPos = s0;
1881
- s0 = peg$f21(s1, s3);
2090
+ s3 = peg$parsepathKey();
2091
+ s2 = s3;
1882
2092
  } else {
1883
- peg$currPos = s0;
1884
- s0 = peg$FAILED;
2093
+ s2 = s3;
1885
2094
  }
1886
- } else {
2095
+ }
2096
+ if (s1.length < 1) {
1887
2097
  peg$currPos = s0;
1888
2098
  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);
2099
+ } else {
1895
2100
  s0 = s1;
1896
2101
  }
1897
2102
  peg$silentFails--;
1898
- if (s0 === peg$FAILED) {
1899
- s1 = peg$FAILED;
1900
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
1901
- }
2103
+ s1 = peg$FAILED;
2104
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
1902
2105
 
1903
2106
  return s0;
1904
2107
  }
@@ -1915,7 +2118,7 @@ function peg$parse(input, options) {
1915
2118
  s2 = peg$parseidentifierChar();
1916
2119
  }
1917
2120
  peg$savedPos = s0;
1918
- s1 = peg$f23(s1);
2121
+ s1 = peg$f22(s1);
1919
2122
  s0 = s1;
1920
2123
  peg$silentFails--;
1921
2124
  s1 = peg$FAILED;
@@ -1932,20 +2135,20 @@ function peg$parse(input, options) {
1932
2135
  s1 = peg$parseprotocol();
1933
2136
  if (s1 !== peg$FAILED) {
1934
2137
  if (input.charCodeAt(peg$currPos) === 58) {
1935
- s2 = peg$c9;
2138
+ s2 = peg$c12;
1936
2139
  peg$currPos++;
1937
2140
  } else {
1938
2141
  s2 = peg$FAILED;
1939
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
2142
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1940
2143
  }
1941
2144
  if (s2 !== peg$FAILED) {
1942
2145
  s3 = [];
1943
2146
  if (input.charCodeAt(peg$currPos) === 47) {
1944
- s4 = peg$c10;
2147
+ s4 = peg$c15;
1945
2148
  peg$currPos++;
1946
2149
  } else {
1947
2150
  s4 = peg$FAILED;
1948
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2151
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1949
2152
  }
1950
2153
  while (s4 !== peg$FAILED) {
1951
2154
  s3.push(s4);
@@ -1953,11 +2156,11 @@ function peg$parse(input, options) {
1953
2156
  s4 = peg$FAILED;
1954
2157
  } else {
1955
2158
  if (input.charCodeAt(peg$currPos) === 47) {
1956
- s4 = peg$c10;
2159
+ s4 = peg$c15;
1957
2160
  peg$currPos++;
1958
2161
  } else {
1959
2162
  s4 = peg$FAILED;
1960
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2163
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1961
2164
  }
1962
2165
  }
1963
2166
  }
@@ -1968,7 +2171,7 @@ function peg$parse(input, options) {
1968
2171
  s5 = null;
1969
2172
  }
1970
2173
  peg$savedPos = s0;
1971
- s0 = peg$f24(s1, s4, s5);
2174
+ s0 = peg$f23(s1, s4, s5);
1972
2175
  } else {
1973
2176
  peg$currPos = s0;
1974
2177
  s0 = peg$FAILED;
@@ -2007,123 +2210,262 @@ function peg$parse(input, options) {
2007
2210
  return s0;
2008
2211
  }
2009
2212
 
2010
- function peg$parsereservedProtocol() {
2011
- var s0, s1;
2213
+ function peg$parsereservedProtocol() {
2214
+ var s0, s1;
2215
+
2216
+ peg$silentFails++;
2217
+ s0 = peg$currPos;
2218
+ if (input.substr(peg$currPos, 5) === peg$c22) {
2219
+ s1 = peg$c22;
2220
+ peg$currPos += 5;
2221
+ } else {
2222
+ s1 = peg$FAILED;
2223
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
2224
+ }
2225
+ if (s1 !== peg$FAILED) {
2226
+ peg$savedPos = s0;
2227
+ s1 = peg$f24();
2228
+ }
2229
+ s0 = s1;
2230
+ if (s0 === peg$FAILED) {
2231
+ s0 = peg$currPos;
2232
+ if (input.substr(peg$currPos, 4) === peg$c23) {
2233
+ s1 = peg$c23;
2234
+ peg$currPos += 4;
2235
+ } else {
2236
+ s1 = peg$FAILED;
2237
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
2238
+ }
2239
+ if (s1 !== peg$FAILED) {
2240
+ peg$savedPos = s0;
2241
+ s1 = peg$f25();
2242
+ }
2243
+ s0 = s1;
2244
+ if (s0 === peg$FAILED) {
2245
+ s0 = peg$currPos;
2246
+ if (input.substr(peg$currPos, 7) === peg$c24) {
2247
+ s1 = peg$c24;
2248
+ peg$currPos += 7;
2249
+ } else {
2250
+ s1 = peg$FAILED;
2251
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
2252
+ }
2253
+ if (s1 !== peg$FAILED) {
2254
+ peg$savedPos = s0;
2255
+ s1 = peg$f26();
2256
+ }
2257
+ s0 = s1;
2258
+ if (s0 === peg$FAILED) {
2259
+ s0 = peg$currPos;
2260
+ if (input.substr(peg$currPos, 9) === peg$c25) {
2261
+ s1 = peg$c25;
2262
+ peg$currPos += 9;
2263
+ } else {
2264
+ s1 = peg$FAILED;
2265
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
2266
+ }
2267
+ if (s1 !== peg$FAILED) {
2268
+ peg$savedPos = s0;
2269
+ s1 = peg$f27();
2270
+ }
2271
+ s0 = s1;
2272
+ if (s0 === peg$FAILED) {
2273
+ s0 = peg$currPos;
2274
+ if (input.substr(peg$currPos, 8) === peg$c26) {
2275
+ s1 = peg$c26;
2276
+ peg$currPos += 8;
2277
+ } else {
2278
+ s1 = peg$FAILED;
2279
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
2280
+ }
2281
+ if (s1 !== peg$FAILED) {
2282
+ peg$savedPos = s0;
2283
+ s1 = peg$f28();
2284
+ }
2285
+ s0 = s1;
2286
+ if (s0 === peg$FAILED) {
2287
+ s0 = peg$currPos;
2288
+ if (input.substr(peg$currPos, 4) === peg$c27) {
2289
+ s1 = peg$c27;
2290
+ peg$currPos += 4;
2291
+ } else {
2292
+ s1 = peg$FAILED;
2293
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
2294
+ }
2295
+ if (s1 !== peg$FAILED) {
2296
+ peg$savedPos = s0;
2297
+ s1 = peg$f29();
2298
+ }
2299
+ s0 = s1;
2300
+ }
2301
+ }
2302
+ }
2303
+ }
2304
+ }
2305
+ peg$silentFails--;
2306
+ if (s0 === peg$FAILED) {
2307
+ s1 = peg$FAILED;
2308
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2309
+ }
2310
+
2311
+ return s0;
2312
+ }
2313
+
2314
+ function peg$parsescopeReference() {
2315
+ var s0, s1;
2316
+
2317
+ peg$silentFails++;
2318
+ s0 = peg$currPos;
2319
+ s1 = peg$parseidentifier();
2320
+ if (s1 !== peg$FAILED) {
2321
+ peg$savedPos = s0;
2322
+ s1 = peg$f30(s1);
2323
+ }
2324
+ s0 = s1;
2325
+ peg$silentFails--;
2326
+ if (s0 === peg$FAILED) {
2327
+ s1 = peg$FAILED;
2328
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
2329
+ }
2330
+
2331
+ return s0;
2332
+ }
2333
+
2334
+ function peg$parseseparator() {
2335
+ var s0, s1, s2, s3;
2336
+
2337
+ s0 = peg$currPos;
2338
+ s1 = peg$parse__();
2339
+ if (input.charCodeAt(peg$currPos) === 44) {
2340
+ s2 = peg$c28;
2341
+ peg$currPos++;
2342
+ } else {
2343
+ s2 = peg$FAILED;
2344
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
2345
+ }
2346
+ if (s2 !== peg$FAILED) {
2347
+ s3 = peg$parse__();
2348
+ s1 = [s1, s2, s3];
2349
+ s0 = s1;
2350
+ } else {
2351
+ peg$currPos = s0;
2352
+ s0 = peg$FAILED;
2353
+ }
2354
+ if (s0 === peg$FAILED) {
2355
+ s0 = peg$parsewhitespaceWithNewLine();
2356
+ }
2357
+
2358
+ return s0;
2359
+ }
2360
+
2361
+ function peg$parsesign() {
2362
+ var s0;
2363
+
2364
+ if (peg$r3.test(input.charAt(peg$currPos))) {
2365
+ s0 = input.charAt(peg$currPos);
2366
+ peg$currPos++;
2367
+ } else {
2368
+ s0 = peg$FAILED;
2369
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
2370
+ }
2371
+
2372
+ return s0;
2373
+ }
2374
+
2375
+ function peg$parsesingleArrow() {
2376
+ var s0;
2377
+
2378
+ if (input.charCodeAt(peg$currPos) === 8594) {
2379
+ s0 = peg$c29;
2380
+ peg$currPos++;
2381
+ } else {
2382
+ s0 = peg$FAILED;
2383
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
2384
+ }
2385
+ if (s0 === peg$FAILED) {
2386
+ if (input.substr(peg$currPos, 2) === peg$c30) {
2387
+ s0 = peg$c30;
2388
+ peg$currPos += 2;
2389
+ } else {
2390
+ s0 = peg$FAILED;
2391
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
2392
+ }
2393
+ }
2394
+
2395
+ return s0;
2396
+ }
2397
+
2398
+ function peg$parsesingleLineComment() {
2399
+ var s0, s1, s2, s3;
2012
2400
 
2013
- peg$silentFails++;
2014
2401
  s0 = peg$currPos;
2015
- if (input.substr(peg$currPos, 5) === peg$c19) {
2016
- s1 = peg$c19;
2017
- peg$currPos += 5;
2402
+ if (input.charCodeAt(peg$currPos) === 35) {
2403
+ s1 = peg$c31;
2404
+ peg$currPos++;
2018
2405
  } else {
2019
2406
  s1 = peg$FAILED;
2020
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
2407
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2021
2408
  }
2022
2409
  if (s1 !== peg$FAILED) {
2410
+ s2 = [];
2411
+ if (peg$r4.test(input.charAt(peg$currPos))) {
2412
+ s3 = input.charAt(peg$currPos);
2413
+ peg$currPos++;
2414
+ } else {
2415
+ s3 = peg$FAILED;
2416
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2417
+ }
2418
+ while (s3 !== peg$FAILED) {
2419
+ s2.push(s3);
2420
+ if (peg$r4.test(input.charAt(peg$currPos))) {
2421
+ s3 = input.charAt(peg$currPos);
2422
+ peg$currPos++;
2423
+ } else {
2424
+ s3 = peg$FAILED;
2425
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2426
+ }
2427
+ }
2023
2428
  peg$savedPos = s0;
2024
- s1 = peg$f25();
2429
+ s0 = peg$f31();
2430
+ } else {
2431
+ peg$currPos = s0;
2432
+ s0 = peg$FAILED;
2025
2433
  }
2026
- s0 = s1;
2027
2434
  if (s0 === peg$FAILED) {
2028
2435
  s0 = peg$currPos;
2029
- if (input.substr(peg$currPos, 4) === peg$c20) {
2030
- s1 = peg$c20;
2031
- peg$currPos += 4;
2436
+ if (input.substr(peg$currPos, 2) === peg$c0) {
2437
+ s1 = peg$c0;
2438
+ peg$currPos += 2;
2032
2439
  } else {
2033
2440
  s1 = peg$FAILED;
2034
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
2441
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
2035
2442
  }
2036
2443
  if (s1 !== peg$FAILED) {
2037
- peg$savedPos = s0;
2038
- s1 = peg$f26();
2039
- }
2040
- s0 = s1;
2041
- if (s0 === peg$FAILED) {
2042
- s0 = peg$currPos;
2043
- if (input.substr(peg$currPos, 7) === peg$c21) {
2044
- s1 = peg$c21;
2045
- peg$currPos += 7;
2444
+ s2 = [];
2445
+ if (peg$r4.test(input.charAt(peg$currPos))) {
2446
+ s3 = input.charAt(peg$currPos);
2447
+ peg$currPos++;
2046
2448
  } else {
2047
- s1 = peg$FAILED;
2048
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
2049
- }
2050
- if (s1 !== peg$FAILED) {
2051
- peg$savedPos = s0;
2052
- s1 = peg$f27();
2449
+ s3 = peg$FAILED;
2450
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2053
2451
  }
2054
- s0 = s1;
2055
- if (s0 === peg$FAILED) {
2056
- s0 = peg$currPos;
2057
- if (input.substr(peg$currPos, 9) === peg$c22) {
2058
- s1 = peg$c22;
2059
- peg$currPos += 9;
2452
+ while (s3 !== peg$FAILED) {
2453
+ s2.push(s3);
2454
+ if (peg$r4.test(input.charAt(peg$currPos))) {
2455
+ s3 = input.charAt(peg$currPos);
2456
+ peg$currPos++;
2060
2457
  } else {
2061
- s1 = peg$FAILED;
2062
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
2063
- }
2064
- if (s1 !== peg$FAILED) {
2065
- peg$savedPos = s0;
2066
- s1 = peg$f28();
2067
- }
2068
- s0 = s1;
2069
- if (s0 === peg$FAILED) {
2070
- s0 = peg$currPos;
2071
- if (input.substr(peg$currPos, 8) === peg$c23) {
2072
- s1 = peg$c23;
2073
- peg$currPos += 8;
2074
- } else {
2075
- s1 = peg$FAILED;
2076
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
2077
- }
2078
- if (s1 !== peg$FAILED) {
2079
- peg$savedPos = s0;
2080
- s1 = peg$f29();
2081
- }
2082
- s0 = s1;
2083
- if (s0 === peg$FAILED) {
2084
- s0 = peg$currPos;
2085
- if (input.substr(peg$currPos, 4) === peg$c24) {
2086
- s1 = peg$c24;
2087
- peg$currPos += 4;
2088
- } else {
2089
- s1 = peg$FAILED;
2090
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
2091
- }
2092
- if (s1 !== peg$FAILED) {
2093
- peg$savedPos = s0;
2094
- s1 = peg$f30();
2095
- }
2096
- s0 = s1;
2097
- }
2458
+ s3 = peg$FAILED;
2459
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2098
2460
  }
2099
2461
  }
2462
+ peg$savedPos = s0;
2463
+ s0 = peg$f32();
2464
+ } else {
2465
+ peg$currPos = s0;
2466
+ s0 = peg$FAILED;
2100
2467
  }
2101
2468
  }
2102
- peg$silentFails--;
2103
- if (s0 === peg$FAILED) {
2104
- s1 = peg$FAILED;
2105
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
2106
- }
2107
-
2108
- return s0;
2109
- }
2110
-
2111
- function peg$parsescopeReference() {
2112
- var s0, s1;
2113
-
2114
- peg$silentFails++;
2115
- s0 = peg$currPos;
2116
- s1 = peg$parseidentifier();
2117
- if (s1 !== peg$FAILED) {
2118
- peg$savedPos = s0;
2119
- s1 = peg$f31(s1);
2120
- }
2121
- s0 = s1;
2122
- peg$silentFails--;
2123
- if (s0 === peg$FAILED) {
2124
- s1 = peg$FAILED;
2125
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2126
- }
2127
2469
 
2128
2470
  return s0;
2129
2471
  }
@@ -2134,11 +2476,11 @@ function peg$parse(input, options) {
2134
2476
  peg$silentFails++;
2135
2477
  s0 = peg$currPos;
2136
2478
  if (input.charCodeAt(peg$currPos) === 39) {
2137
- s1 = peg$c25;
2479
+ s1 = peg$c32;
2138
2480
  peg$currPos++;
2139
2481
  } else {
2140
2482
  s1 = peg$FAILED;
2141
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2483
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2142
2484
  }
2143
2485
  if (s1 !== peg$FAILED) {
2144
2486
  s2 = [];
@@ -2148,15 +2490,15 @@ function peg$parse(input, options) {
2148
2490
  s3 = peg$parsesingleQuoteStringChar();
2149
2491
  }
2150
2492
  if (input.charCodeAt(peg$currPos) === 39) {
2151
- s3 = peg$c25;
2493
+ s3 = peg$c32;
2152
2494
  peg$currPos++;
2153
2495
  } else {
2154
2496
  s3 = peg$FAILED;
2155
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2497
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2156
2498
  }
2157
2499
  if (s3 !== peg$FAILED) {
2158
2500
  peg$savedPos = s0;
2159
- s0 = peg$f32(s2);
2501
+ s0 = peg$f33(s2);
2160
2502
  } else {
2161
2503
  peg$currPos = s0;
2162
2504
  s0 = peg$FAILED;
@@ -2168,7 +2510,7 @@ function peg$parse(input, options) {
2168
2510
  peg$silentFails--;
2169
2511
  if (s0 === peg$FAILED) {
2170
2512
  s1 = peg$FAILED;
2171
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
2513
+ if (peg$silentFails === 0) { peg$fail(peg$e67); }
2172
2514
  }
2173
2515
 
2174
2516
  return s0;
@@ -2181,11 +2523,11 @@ function peg$parse(input, options) {
2181
2523
  s1 = peg$currPos;
2182
2524
  peg$silentFails++;
2183
2525
  if (input.charCodeAt(peg$currPos) === 39) {
2184
- s2 = peg$c25;
2526
+ s2 = peg$c32;
2185
2527
  peg$currPos++;
2186
2528
  } else {
2187
2529
  s2 = peg$FAILED;
2188
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2530
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2189
2531
  }
2190
2532
  if (s2 === peg$FAILED) {
2191
2533
  s2 = peg$parsenewLine();
@@ -2213,6 +2555,50 @@ function peg$parse(input, options) {
2213
2555
  return s0;
2214
2556
  }
2215
2557
 
2558
+ function peg$parsestep() {
2559
+ var s0;
2560
+
2561
+ s0 = peg$parsenumber();
2562
+ if (s0 === peg$FAILED) {
2563
+ s0 = peg$parsefunctionComposition();
2564
+ if (s0 === peg$FAILED) {
2565
+ s0 = peg$parseabsoluteFilePath();
2566
+ if (s0 === peg$FAILED) {
2567
+ s0 = peg$parsearray();
2568
+ if (s0 === peg$FAILED) {
2569
+ s0 = peg$parseobject();
2570
+ if (s0 === peg$FAILED) {
2571
+ s0 = peg$parsetree();
2572
+ if (s0 === peg$FAILED) {
2573
+ s0 = peg$parselambda();
2574
+ if (s0 === peg$FAILED) {
2575
+ s0 = peg$parseparameterizedLambda();
2576
+ if (s0 === peg$FAILED) {
2577
+ s0 = peg$parsetemplateLiteral();
2578
+ if (s0 === peg$FAILED) {
2579
+ s0 = peg$parsestring();
2580
+ if (s0 === peg$FAILED) {
2581
+ s0 = peg$parsegroup();
2582
+ if (s0 === peg$FAILED) {
2583
+ s0 = peg$parseprotocolCall();
2584
+ if (s0 === peg$FAILED) {
2585
+ s0 = peg$parsescopeReference();
2586
+ }
2587
+ }
2588
+ }
2589
+ }
2590
+ }
2591
+ }
2592
+ }
2593
+ }
2594
+ }
2595
+ }
2596
+ }
2597
+ }
2598
+
2599
+ return s0;
2600
+ }
2601
+
2216
2602
  function peg$parsestart() {
2217
2603
  var s0;
2218
2604
 
@@ -2232,7 +2618,7 @@ function peg$parse(input, options) {
2232
2618
  peg$silentFails--;
2233
2619
  if (s0 === peg$FAILED) {
2234
2620
  s1 = peg$FAILED;
2235
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2621
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
2236
2622
  }
2237
2623
 
2238
2624
  return s0;
@@ -2245,11 +2631,11 @@ function peg$parse(input, options) {
2245
2631
  s0 = peg$currPos;
2246
2632
  s1 = peg$parsetemplateDocumentContents();
2247
2633
  peg$savedPos = s0;
2248
- s1 = peg$f33(s1);
2634
+ s1 = peg$f34(s1);
2249
2635
  s0 = s1;
2250
2636
  peg$silentFails--;
2251
2637
  s1 = peg$FAILED;
2252
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2638
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
2253
2639
 
2254
2640
  return s0;
2255
2641
  }
@@ -2260,12 +2646,21 @@ function peg$parse(input, options) {
2260
2646
  s0 = peg$currPos;
2261
2647
  s1 = peg$currPos;
2262
2648
  peg$silentFails++;
2263
- if (input.substr(peg$currPos, 2) === peg$c26) {
2264
- s2 = peg$c26;
2649
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2650
+ s2 = peg$c33;
2265
2651
  peg$currPos += 2;
2266
2652
  } else {
2267
2653
  s2 = peg$FAILED;
2268
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2654
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2655
+ }
2656
+ if (s2 === peg$FAILED) {
2657
+ if (input.substr(peg$currPos, 2) === peg$c34) {
2658
+ s2 = peg$c34;
2659
+ peg$currPos += 2;
2660
+ } else {
2661
+ s2 = peg$FAILED;
2662
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
2663
+ }
2269
2664
  }
2270
2665
  peg$silentFails--;
2271
2666
  if (s2 === peg$FAILED) {
@@ -2307,7 +2702,7 @@ function peg$parse(input, options) {
2307
2702
  }
2308
2703
  }
2309
2704
  peg$savedPos = s0;
2310
- s1 = peg$f34(s1);
2705
+ s1 = peg$f35(s1);
2311
2706
  s0 = s1;
2312
2707
 
2313
2708
  return s0;
@@ -2330,13 +2725,13 @@ function peg$parse(input, options) {
2330
2725
  }
2331
2726
  if (s1 !== peg$FAILED) {
2332
2727
  peg$savedPos = s0;
2333
- s1 = peg$f35(s1);
2728
+ s1 = peg$f36(s1);
2334
2729
  }
2335
2730
  s0 = s1;
2336
2731
  peg$silentFails--;
2337
2732
  if (s0 === peg$FAILED) {
2338
2733
  s1 = peg$FAILED;
2339
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2734
+ if (peg$silentFails === 0) { peg$fail(peg$e73); }
2340
2735
  }
2341
2736
 
2342
2737
  return s0;
@@ -2348,20 +2743,20 @@ function peg$parse(input, options) {
2348
2743
  peg$silentFails++;
2349
2744
  s0 = peg$currPos;
2350
2745
  if (input.charCodeAt(peg$currPos) === 96) {
2351
- s1 = peg$c27;
2746
+ s1 = peg$c35;
2352
2747
  peg$currPos++;
2353
2748
  } else {
2354
2749
  s1 = peg$FAILED;
2355
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2750
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
2356
2751
  }
2357
2752
  if (s1 !== peg$FAILED) {
2358
2753
  s2 = peg$parsetemplateLiteralContents();
2359
2754
  if (input.charCodeAt(peg$currPos) === 96) {
2360
- s3 = peg$c27;
2755
+ s3 = peg$c35;
2361
2756
  peg$currPos++;
2362
2757
  } else {
2363
2758
  s3 = peg$FAILED;
2364
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2759
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
2365
2760
  }
2366
2761
  if (s3 !== peg$FAILED) {
2367
2762
  s0 = s2;
@@ -2376,7 +2771,7 @@ function peg$parse(input, options) {
2376
2771
  peg$silentFails--;
2377
2772
  if (s0 === peg$FAILED) {
2378
2773
  s1 = peg$FAILED;
2379
- if (peg$silentFails === 0) { peg$fail(peg$e67); }
2774
+ if (peg$silentFails === 0) { peg$fail(peg$e74); }
2380
2775
  }
2381
2776
 
2382
2777
  return s0;
@@ -2389,19 +2784,28 @@ function peg$parse(input, options) {
2389
2784
  s1 = peg$currPos;
2390
2785
  peg$silentFails++;
2391
2786
  if (input.charCodeAt(peg$currPos) === 96) {
2392
- s2 = peg$c27;
2787
+ s2 = peg$c35;
2393
2788
  peg$currPos++;
2394
2789
  } else {
2395
2790
  s2 = peg$FAILED;
2396
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2791
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
2397
2792
  }
2398
2793
  if (s2 === peg$FAILED) {
2399
- if (input.substr(peg$currPos, 2) === peg$c26) {
2400
- s2 = peg$c26;
2794
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2795
+ s2 = peg$c33;
2401
2796
  peg$currPos += 2;
2402
2797
  } else {
2403
2798
  s2 = peg$FAILED;
2404
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2799
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2800
+ }
2801
+ if (s2 === peg$FAILED) {
2802
+ if (input.substr(peg$currPos, 2) === peg$c34) {
2803
+ s2 = peg$c34;
2804
+ peg$currPos += 2;
2805
+ } else {
2806
+ s2 = peg$FAILED;
2807
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
2808
+ }
2405
2809
  }
2406
2810
  }
2407
2811
  peg$silentFails--;
@@ -2444,7 +2848,7 @@ function peg$parse(input, options) {
2444
2848
  }
2445
2849
  }
2446
2850
  peg$savedPos = s0;
2447
- s1 = peg$f36(s1);
2851
+ s1 = peg$f37(s1);
2448
2852
  s0 = s1;
2449
2853
 
2450
2854
  return s0;
@@ -2466,7 +2870,7 @@ function peg$parse(input, options) {
2466
2870
  }
2467
2871
  if (s1 !== peg$FAILED) {
2468
2872
  peg$savedPos = s0;
2469
- s1 = peg$f37(s1);
2873
+ s1 = peg$f38(s1);
2470
2874
  }
2471
2875
  s0 = s1;
2472
2876
 
@@ -2478,22 +2882,22 @@ function peg$parse(input, options) {
2478
2882
 
2479
2883
  peg$silentFails++;
2480
2884
  s0 = peg$currPos;
2481
- if (input.substr(peg$currPos, 2) === peg$c26) {
2482
- s1 = peg$c26;
2885
+ if (input.substr(peg$currPos, 2) === peg$c33) {
2886
+ s1 = peg$c33;
2483
2887
  peg$currPos += 2;
2484
2888
  } else {
2485
2889
  s1 = peg$FAILED;
2486
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2890
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
2487
2891
  }
2488
2892
  if (s1 !== peg$FAILED) {
2489
2893
  s2 = peg$parseexpression();
2490
2894
  if (s2 !== peg$FAILED) {
2491
- if (input.substr(peg$currPos, 2) === peg$c28) {
2492
- s3 = peg$c28;
2895
+ if (input.substr(peg$currPos, 2) === peg$c36) {
2896
+ s3 = peg$c36;
2493
2897
  peg$currPos += 2;
2494
2898
  } else {
2495
2899
  s3 = peg$FAILED;
2496
- if (peg$silentFails === 0) { peg$fail(peg$e70); }
2900
+ if (peg$silentFails === 0) { peg$fail(peg$e77); }
2497
2901
  }
2498
2902
  if (s3 !== peg$FAILED) {
2499
2903
  s0 = s2;
@@ -2509,10 +2913,44 @@ function peg$parse(input, options) {
2509
2913
  peg$currPos = s0;
2510
2914
  s0 = peg$FAILED;
2511
2915
  }
2916
+ if (s0 === peg$FAILED) {
2917
+ s0 = peg$currPos;
2918
+ if (input.substr(peg$currPos, 2) === peg$c34) {
2919
+ s1 = peg$c34;
2920
+ peg$currPos += 2;
2921
+ } else {
2922
+ s1 = peg$FAILED;
2923
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
2924
+ }
2925
+ if (s1 !== peg$FAILED) {
2926
+ s2 = peg$parseexpression();
2927
+ if (s2 !== peg$FAILED) {
2928
+ if (input.charCodeAt(peg$currPos) === 125) {
2929
+ s3 = peg$c3;
2930
+ peg$currPos++;
2931
+ } else {
2932
+ s3 = peg$FAILED;
2933
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2934
+ }
2935
+ if (s3 !== peg$FAILED) {
2936
+ s0 = s2;
2937
+ } else {
2938
+ peg$currPos = s0;
2939
+ s0 = peg$FAILED;
2940
+ }
2941
+ } else {
2942
+ peg$currPos = s0;
2943
+ s0 = peg$FAILED;
2944
+ }
2945
+ } else {
2946
+ peg$currPos = s0;
2947
+ s0 = peg$FAILED;
2948
+ }
2949
+ }
2512
2950
  peg$silentFails--;
2513
2951
  if (s0 === peg$FAILED) {
2514
2952
  s1 = peg$FAILED;
2515
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
2953
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
2516
2954
  }
2517
2955
 
2518
2956
  return s0;
@@ -2528,7 +2966,7 @@ function peg$parse(input, options) {
2528
2966
  peg$currPos++;
2529
2967
  } else {
2530
2968
  s0 = peg$FAILED;
2531
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
2969
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2532
2970
  }
2533
2971
  }
2534
2972
 
@@ -2536,16 +2974,16 @@ function peg$parse(input, options) {
2536
2974
  }
2537
2975
 
2538
2976
  function peg$parsetree() {
2539
- var s0, s1, s2, s3, s4;
2977
+ var s0, s1, s2, s3, s4, s5;
2540
2978
 
2541
2979
  peg$silentFails++;
2542
2980
  s0 = peg$currPos;
2543
2981
  if (input.charCodeAt(peg$currPos) === 123) {
2544
- s1 = peg$c14;
2982
+ s1 = peg$c21;
2545
2983
  peg$currPos++;
2546
2984
  } else {
2547
2985
  s1 = peg$FAILED;
2548
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
2986
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
2549
2987
  }
2550
2988
  if (s1 !== peg$FAILED) {
2551
2989
  s2 = peg$parse__();
@@ -2553,16 +2991,11 @@ function peg$parse(input, options) {
2553
2991
  if (s3 === peg$FAILED) {
2554
2992
  s3 = null;
2555
2993
  }
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) {
2994
+ s4 = peg$parse__();
2995
+ s5 = peg$parseclosingBrace();
2996
+ if (s5 !== peg$FAILED) {
2564
2997
  peg$savedPos = s0;
2565
- s0 = peg$f38(s3);
2998
+ s0 = peg$f39(s3);
2566
2999
  } else {
2567
3000
  peg$currPos = s0;
2568
3001
  s0 = peg$FAILED;
@@ -2574,57 +3007,47 @@ function peg$parse(input, options) {
2574
3007
  peg$silentFails--;
2575
3008
  if (s0 === peg$FAILED) {
2576
3009
  s1 = peg$FAILED;
2577
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
3010
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
2578
3011
  }
2579
3012
 
2580
3013
  return s0;
2581
3014
  }
2582
3015
 
2583
3016
  function peg$parsetreeAssignments() {
2584
- var s0, s1, s2, s3, s4, s5;
3017
+ var s0, s1, s2, s3, s4;
2585
3018
 
2586
3019
  s0 = peg$currPos;
2587
- s1 = peg$parseassignmentOrShorthand();
2588
- if (s1 !== peg$FAILED) {
2589
- s2 = [];
3020
+ s1 = peg$currPos;
3021
+ s2 = [];
3022
+ s3 = peg$parseassignmentOrShorthand();
3023
+ while (s3 !== peg$FAILED) {
3024
+ s2.push(s3);
2590
3025
  s3 = peg$currPos;
2591
3026
  s4 = peg$parseseparator();
2592
3027
  if (s4 !== peg$FAILED) {
2593
- s5 = peg$parseassignmentOrShorthand();
2594
- if (s5 !== peg$FAILED) {
2595
- s3 = s5;
2596
- } else {
3028
+ s4 = peg$parseassignmentOrShorthand();
3029
+ if (s4 === peg$FAILED) {
2597
3030
  peg$currPos = s3;
2598
3031
  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
3032
  } else {
2617
- peg$currPos = s3;
2618
- s3 = peg$FAILED;
3033
+ s3 = s4;
2619
3034
  }
3035
+ } else {
3036
+ s3 = s4;
2620
3037
  }
2621
- s3 = peg$parseseparator();
2622
- if (s3 === peg$FAILED) {
2623
- s3 = null;
3038
+ }
3039
+ if (s2.length < 1) {
3040
+ peg$currPos = s1;
3041
+ s1 = peg$FAILED;
3042
+ } else {
3043
+ s1 = s2;
3044
+ }
3045
+ if (s1 !== peg$FAILED) {
3046
+ s2 = peg$parseseparator();
3047
+ if (s2 === peg$FAILED) {
3048
+ s2 = null;
2624
3049
  }
2625
- s4 = peg$parse__();
2626
- peg$savedPos = s0;
2627
- s0 = peg$f39(s1, s2);
3050
+ s0 = s1;
2628
3051
  } else {
2629
3052
  peg$currPos = s0;
2630
3053
  s0 = peg$FAILED;