Comparing version 0.1.6 to 0.2.0
{ | ||
"name": "objc2swift", | ||
"version": "0.1.6", | ||
"version": "0.2.0", | ||
"description": "Objective-C to Swift Converter", | ||
"main": "src/main.js", | ||
"files": ["bin", "src", "package.json", "LICENSE", "README.md"], | ||
"files": [ | ||
"bin", | ||
"src", | ||
"package.json", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"bin": { | ||
@@ -13,18 +19,16 @@ "objc2swift": "bin/cmd.js" | ||
"glob": "^6.0.4", | ||
"node-getopt": "^0.2.3" | ||
"node-getopt": "^0.3.2" | ||
}, | ||
"devDependencies": { | ||
"diff": "^2.2.1", | ||
"gulp": "^3.9.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-uglify": "^1.5.1", | ||
"gulp-util": "^3.0.7", | ||
"object-assign": "^4.0.1", | ||
"open": "0.0.5", | ||
"diff": "^5.0.0", | ||
"pegjs": "^0.10.0", | ||
"through2": "^2.0.0", | ||
"webpack-stream": "^3.1.0" | ||
"webpack": "^4.46.0", | ||
"webpack-cli": "^4.7.2" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build-pp-parser": "pegjs -o ./src/preprocess-parser.js ./grammar/preprocess.pegjs", | ||
"build-parser": "pegjs -o ./src/parser.js ./grammar/objc.pegjs", | ||
"build": "npm run build-parser && npm run build-pp-parser", | ||
"webpack": "webpack" | ||
}, | ||
@@ -31,0 +35,0 @@ "keywords": [ |
@@ -73,3 +73,3 @@ # Objc2Swift.js [![npm version](https://badge.fury.io/js/objc2swift.svg)](https://badge.fury.io/js/objc2swift) | ||
npm install | ||
./node_modules/.bin/gulp build | ||
npm run build | ||
``` |
@@ -67,3 +67,3 @@ module.exports = (function(){ | ||
if(typeInfo.kind == TypeInfo.KIND_BASIC || typeInfo.kind == TypeInfo.KIND_CLASS) { | ||
if(typeInfo.kind == TypeInfo.KIND_BASIC || typeInfo.kind == TypeInfo.KIND_CLASS || typeInfo.kind == TypeInfo.KIND_STRUCT) { | ||
@@ -684,2 +684,10 @@ var name = OBJC_TO_SWIFT_TYPE_MAP[typeInfo.name]||typeInfo.name; | ||
Generator.prototype.JumpStatement = function(node) { | ||
return "goto " + this.convert([node.c1, node.label, node.c2]); | ||
}; | ||
Generator.prototype.LabeledStatement = function(node) { | ||
return this.convert([node.label, node.c1, ":", node.c2, node.statement]); | ||
}; | ||
Generator.prototype.BreakStatement = function(node) { | ||
@@ -686,0 +694,0 @@ return "break" + node.c1; |
@@ -1,2 +0,2 @@ | ||
module.exports=/* | ||
/* | ||
* Generated by PEG.js 0.10.0. | ||
@@ -6,339 +6,356 @@ * | ||
*/ | ||
(function() { | ||
"use strict"; | ||
function peg$subclass(child, parent) { | ||
function ctor() { this.constructor = child; } | ||
ctor.prototype = parent.prototype; | ||
child.prototype = new ctor(); | ||
} | ||
"use strict"; | ||
function peg$SyntaxError(message, expected, found, location) { | ||
this.message = message; | ||
this.expected = expected; | ||
this.found = found; | ||
this.location = location; | ||
this.name = "SyntaxError"; | ||
function peg$subclass(child, parent) { | ||
function ctor() { this.constructor = child; } | ||
ctor.prototype = parent.prototype; | ||
child.prototype = new ctor(); | ||
} | ||
if (typeof Error.captureStackTrace === "function") { | ||
Error.captureStackTrace(this, peg$SyntaxError); | ||
} | ||
function peg$SyntaxError(message, expected, found, location) { | ||
this.message = message; | ||
this.expected = expected; | ||
this.found = found; | ||
this.location = location; | ||
this.name = "SyntaxError"; | ||
if (typeof Error.captureStackTrace === "function") { | ||
Error.captureStackTrace(this, peg$SyntaxError); | ||
} | ||
} | ||
peg$subclass(peg$SyntaxError, Error); | ||
peg$subclass(peg$SyntaxError, Error); | ||
peg$SyntaxError.buildMessage = function(expected, found) { | ||
var DESCRIBE_EXPECTATION_FNS = { | ||
literal: function(expectation) { | ||
return "\"" + literalEscape(expectation.text) + "\""; | ||
}, | ||
peg$SyntaxError.buildMessage = function(expected, found) { | ||
var DESCRIBE_EXPECTATION_FNS = { | ||
literal: function(expectation) { | ||
return "\"" + literalEscape(expectation.text) + "\""; | ||
}, | ||
"class": function(expectation) { | ||
var escapedParts = "", | ||
i; | ||
"class": function(expectation) { | ||
var escapedParts = "", | ||
i; | ||
for (i = 0; i < expectation.parts.length; i++) { | ||
escapedParts += expectation.parts[i] instanceof Array | ||
? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) | ||
: classEscape(expectation.parts[i]); | ||
} | ||
for (i = 0; i < expectation.parts.length; i++) { | ||
escapedParts += expectation.parts[i] instanceof Array | ||
? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) | ||
: classEscape(expectation.parts[i]); | ||
} | ||
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; | ||
}, | ||
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; | ||
}, | ||
any: function(expectation) { | ||
return "any character"; | ||
}, | ||
any: function(expectation) { | ||
return "any character"; | ||
}, | ||
end: function(expectation) { | ||
return "end of input"; | ||
}, | ||
end: function(expectation) { | ||
return "end of input"; | ||
}, | ||
other: function(expectation) { | ||
return expectation.description; | ||
} | ||
}; | ||
other: function(expectation) { | ||
return expectation.description; | ||
} | ||
}; | ||
function hex(ch) { | ||
return ch.charCodeAt(0).toString(16).toUpperCase(); | ||
} | ||
function hex(ch) { | ||
return ch.charCodeAt(0).toString(16).toUpperCase(); | ||
} | ||
function literalEscape(s) { | ||
return s | ||
.replace(/\\/g, '\\\\') | ||
.replace(/"/g, '\\"') | ||
.replace(/\0/g, '\\0') | ||
.replace(/\t/g, '\\t') | ||
.replace(/\n/g, '\\n') | ||
.replace(/\r/g, '\\r') | ||
.replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) | ||
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); | ||
} | ||
function literalEscape(s) { | ||
return s | ||
.replace(/\\/g, '\\\\') | ||
.replace(/"/g, '\\"') | ||
.replace(/\0/g, '\\0') | ||
.replace(/\t/g, '\\t') | ||
.replace(/\n/g, '\\n') | ||
.replace(/\r/g, '\\r') | ||
.replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) | ||
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); | ||
} | ||
function classEscape(s) { | ||
return s | ||
.replace(/\\/g, '\\\\') | ||
.replace(/\]/g, '\\]') | ||
.replace(/\^/g, '\\^') | ||
.replace(/-/g, '\\-') | ||
.replace(/\0/g, '\\0') | ||
.replace(/\t/g, '\\t') | ||
.replace(/\n/g, '\\n') | ||
.replace(/\r/g, '\\r') | ||
.replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) | ||
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); | ||
} | ||
function classEscape(s) { | ||
return s | ||
.replace(/\\/g, '\\\\') | ||
.replace(/\]/g, '\\]') | ||
.replace(/\^/g, '\\^') | ||
.replace(/-/g, '\\-') | ||
.replace(/\0/g, '\\0') | ||
.replace(/\t/g, '\\t') | ||
.replace(/\n/g, '\\n') | ||
.replace(/\r/g, '\\r') | ||
.replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) | ||
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); | ||
} | ||
function describeExpectation(expectation) { | ||
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); | ||
} | ||
function describeExpectation(expectation) { | ||
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); | ||
} | ||
function describeExpected(expected) { | ||
var descriptions = new Array(expected.length), | ||
i, j; | ||
function describeExpected(expected) { | ||
var descriptions = new Array(expected.length), | ||
i, j; | ||
for (i = 0; i < expected.length; i++) { | ||
descriptions[i] = describeExpectation(expected[i]); | ||
} | ||
for (i = 0; i < expected.length; i++) { | ||
descriptions[i] = describeExpectation(expected[i]); | ||
} | ||
descriptions.sort(); | ||
descriptions.sort(); | ||
if (descriptions.length > 0) { | ||
for (i = 1, j = 1; i < descriptions.length; i++) { | ||
if (descriptions[i - 1] !== descriptions[i]) { | ||
descriptions[j] = descriptions[i]; | ||
j++; | ||
} | ||
if (descriptions.length > 0) { | ||
for (i = 1, j = 1; i < descriptions.length; i++) { | ||
if (descriptions[i - 1] !== descriptions[i]) { | ||
descriptions[j] = descriptions[i]; | ||
j++; | ||
} | ||
descriptions.length = j; | ||
} | ||
descriptions.length = j; | ||
} | ||
switch (descriptions.length) { | ||
case 1: | ||
return descriptions[0]; | ||
switch (descriptions.length) { | ||
case 1: | ||
return descriptions[0]; | ||
case 2: | ||
return descriptions[0] + " or " + descriptions[1]; | ||
case 2: | ||
return descriptions[0] + " or " + descriptions[1]; | ||
default: | ||
return descriptions.slice(0, -1).join(", ") | ||
+ ", or " | ||
+ descriptions[descriptions.length - 1]; | ||
} | ||
default: | ||
return descriptions.slice(0, -1).join(", ") | ||
+ ", or " | ||
+ descriptions[descriptions.length - 1]; | ||
} | ||
} | ||
function describeFound(found) { | ||
return found ? "\"" + literalEscape(found) + "\"" : "end of input"; | ||
} | ||
function describeFound(found) { | ||
return found ? "\"" + literalEscape(found) + "\"" : "end of input"; | ||
} | ||
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; | ||
}; | ||
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; | ||
}; | ||
function peg$parse(input, options) { | ||
options = options !== void 0 ? options : {}; | ||
function peg$parse(input, options) { | ||
options = options !== void 0 ? options : {}; | ||
var peg$FAILED = {}, | ||
var peg$FAILED = {}, | ||
peg$startRuleFunctions = { Start: peg$parseStart }, | ||
peg$startRuleFunction = peg$parseStart, | ||
peg$startRuleFunctions = { Start: peg$parseStart }, | ||
peg$startRuleFunction = peg$parseStart, | ||
peg$c0 = function(m, n) { | ||
var buf = []; | ||
for(var i=0;i<m.length;i++) { | ||
buf.push(m[i][0] + m[i][1]); | ||
} | ||
buf.push(n); | ||
return buf.join(''); | ||
}, | ||
peg$c1 = "*", | ||
peg$c2 = peg$literalExpectation("*", false), | ||
peg$c3 = peg$anyExpectation(), | ||
peg$c4 = /^[a-zA-Z_]/, | ||
peg$c5 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false), | ||
peg$c6 = /^[a-zA-Z0-9_]/, | ||
peg$c7 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), | ||
peg$c8 = "(", | ||
peg$c9 = peg$literalExpectation("(", false), | ||
peg$c10 = ")", | ||
peg$c11 = peg$literalExpectation(")", false), | ||
peg$c12 = function(name, args) { | ||
var list = args?args[3]:null; | ||
var result = options.expandMacro(name, list?list:[]); | ||
if(result!=null) return result; | ||
return text(); | ||
}, | ||
peg$c13 = ",", | ||
peg$c14 = peg$literalExpectation(",", false), | ||
peg$c15 = function(head, tail) { | ||
var result = [head]; | ||
for(var i=0;i<tail.length;i++) { | ||
result = result.concat(tail[i]); | ||
} | ||
return result; | ||
}, | ||
peg$c16 = /^[^\n,)]/, | ||
peg$c17 = peg$classExpectation(["\n", ",", ")"], true, false), | ||
peg$c18 = "\"", | ||
peg$c19 = peg$literalExpectation("\"", false), | ||
peg$c20 = "\\\"", | ||
peg$c21 = peg$literalExpectation("\\\"", false), | ||
peg$c22 = /^[ \t\n]/, | ||
peg$c23 = peg$classExpectation([" ", "\t", "\n"], false, false), | ||
peg$c24 = "\\", | ||
peg$c25 = peg$literalExpectation("\\", false), | ||
peg$c26 = /^[\n]/, | ||
peg$c27 = peg$classExpectation(["\n"], false, false), | ||
peg$c28 = "/*", | ||
peg$c29 = peg$literalExpectation("/*", false), | ||
peg$c30 = "*/", | ||
peg$c31 = peg$literalExpectation("*/", false), | ||
peg$c32 = "//", | ||
peg$c33 = peg$literalExpectation("//", false), | ||
peg$c34 = "#", | ||
peg$c35 = peg$literalExpectation("#", false), | ||
peg$c36 = "\\\n", | ||
peg$c37 = peg$literalExpectation("\\\n", false), | ||
peg$c38 = function() {return text();}, | ||
peg$c0 = function(m, n) { | ||
var buf = []; | ||
for(var i=0;i<m.length;i++) { | ||
buf.push(m[i][0] + m[i][1]); | ||
} | ||
buf.push(n); | ||
return buf.join(''); | ||
}, | ||
peg$c1 = "*", | ||
peg$c2 = peg$literalExpectation("*", false), | ||
peg$c3 = peg$anyExpectation(), | ||
peg$c4 = /^[a-zA-Z_]/, | ||
peg$c5 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false), | ||
peg$c6 = /^[a-zA-Z0-9_]/, | ||
peg$c7 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), | ||
peg$c8 = "(", | ||
peg$c9 = peg$literalExpectation("(", false), | ||
peg$c10 = ")", | ||
peg$c11 = peg$literalExpectation(")", false), | ||
peg$c12 = function(name, args) { | ||
var list = args?args[3]:null; | ||
var result = options.expandMacro(name, list?list:[]); | ||
if(result!=null) return result; | ||
return text(); | ||
}, | ||
peg$c13 = ",", | ||
peg$c14 = peg$literalExpectation(",", false), | ||
peg$c15 = function(head, tail) { | ||
var result = [head]; | ||
for(var i=0;i<tail.length;i++) { | ||
result = result.concat(tail[i]); | ||
} | ||
return result; | ||
}, | ||
peg$c16 = /^[^\n,)]/, | ||
peg$c17 = peg$classExpectation(["\n", ",", ")"], true, false), | ||
peg$c18 = "\"", | ||
peg$c19 = peg$literalExpectation("\"", false), | ||
peg$c20 = "\\\"", | ||
peg$c21 = peg$literalExpectation("\\\"", false), | ||
peg$c22 = /^[ \t\n]/, | ||
peg$c23 = peg$classExpectation([" ", "\t", "\n"], false, false), | ||
peg$c24 = "\\", | ||
peg$c25 = peg$literalExpectation("\\", false), | ||
peg$c26 = /^[\n]/, | ||
peg$c27 = peg$classExpectation(["\n"], false, false), | ||
peg$c28 = "/*", | ||
peg$c29 = peg$literalExpectation("/*", false), | ||
peg$c30 = "*/", | ||
peg$c31 = peg$literalExpectation("*/", false), | ||
peg$c32 = "//", | ||
peg$c33 = peg$literalExpectation("//", false), | ||
peg$c34 = "#", | ||
peg$c35 = peg$literalExpectation("#", false), | ||
peg$c36 = "\\\n", | ||
peg$c37 = peg$literalExpectation("\\\n", false), | ||
peg$c38 = function() {return text();}, | ||
peg$currPos = 0, | ||
peg$savedPos = 0, | ||
peg$posDetailsCache = [{ line: 1, column: 1 }], | ||
peg$maxFailPos = 0, | ||
peg$maxFailExpected = [], | ||
peg$silentFails = 0, | ||
peg$currPos = 0, | ||
peg$savedPos = 0, | ||
peg$posDetailsCache = [{ line: 1, column: 1 }], | ||
peg$maxFailPos = 0, | ||
peg$maxFailExpected = [], | ||
peg$silentFails = 0, | ||
peg$result; | ||
peg$result; | ||
if ("startRule" in options) { | ||
if (!(options.startRule in peg$startRuleFunctions)) { | ||
throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); | ||
} | ||
peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; | ||
if ("startRule" in options) { | ||
if (!(options.startRule in peg$startRuleFunctions)) { | ||
throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); | ||
} | ||
function text() { | ||
return input.substring(peg$savedPos, peg$currPos); | ||
} | ||
peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; | ||
} | ||
function location() { | ||
return peg$computeLocation(peg$savedPos, peg$currPos); | ||
} | ||
function text() { | ||
return input.substring(peg$savedPos, peg$currPos); | ||
} | ||
function expected(description, location) { | ||
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) | ||
function location() { | ||
return peg$computeLocation(peg$savedPos, peg$currPos); | ||
} | ||
throw peg$buildStructuredError( | ||
[peg$otherExpectation(description)], | ||
input.substring(peg$savedPos, peg$currPos), | ||
location | ||
); | ||
} | ||
function expected(description, location) { | ||
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) | ||
function error(message, location) { | ||
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) | ||
throw peg$buildStructuredError( | ||
[peg$otherExpectation(description)], | ||
input.substring(peg$savedPos, peg$currPos), | ||
location | ||
); | ||
} | ||
throw peg$buildSimpleError(message, location); | ||
} | ||
function error(message, location) { | ||
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) | ||
function peg$literalExpectation(text, ignoreCase) { | ||
return { type: "literal", text: text, ignoreCase: ignoreCase }; | ||
} | ||
throw peg$buildSimpleError(message, location); | ||
} | ||
function peg$classExpectation(parts, inverted, ignoreCase) { | ||
return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; | ||
} | ||
function peg$literalExpectation(text, ignoreCase) { | ||
return { type: "literal", text: text, ignoreCase: ignoreCase }; | ||
} | ||
function peg$anyExpectation() { | ||
return { type: "any" }; | ||
} | ||
function peg$classExpectation(parts, inverted, ignoreCase) { | ||
return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; | ||
} | ||
function peg$endExpectation() { | ||
return { type: "end" }; | ||
} | ||
function peg$anyExpectation() { | ||
return { type: "any" }; | ||
} | ||
function peg$otherExpectation(description) { | ||
return { type: "other", description: description }; | ||
} | ||
function peg$endExpectation() { | ||
return { type: "end" }; | ||
} | ||
function peg$computePosDetails(pos) { | ||
var details = peg$posDetailsCache[pos], p; | ||
function peg$otherExpectation(description) { | ||
return { type: "other", description: description }; | ||
} | ||
if (details) { | ||
return details; | ||
} else { | ||
p = pos - 1; | ||
while (!peg$posDetailsCache[p]) { | ||
p--; | ||
} | ||
function peg$computePosDetails(pos) { | ||
var details = peg$posDetailsCache[pos], p; | ||
details = peg$posDetailsCache[p]; | ||
details = { | ||
line: details.line, | ||
column: details.column | ||
}; | ||
if (details) { | ||
return details; | ||
} else { | ||
p = pos - 1; | ||
while (!peg$posDetailsCache[p]) { | ||
p--; | ||
} | ||
while (p < pos) { | ||
if (input.charCodeAt(p) === 10) { | ||
details.line++; | ||
details.column = 1; | ||
} else { | ||
details.column++; | ||
} | ||
details = peg$posDetailsCache[p]; | ||
details = { | ||
line: details.line, | ||
column: details.column | ||
}; | ||
p++; | ||
while (p < pos) { | ||
if (input.charCodeAt(p) === 10) { | ||
details.line++; | ||
details.column = 1; | ||
} else { | ||
details.column++; | ||
} | ||
peg$posDetailsCache[pos] = details; | ||
return details; | ||
p++; | ||
} | ||
} | ||
function peg$computeLocation(startPos, endPos) { | ||
var startPosDetails = peg$computePosDetails(startPos), | ||
endPosDetails = peg$computePosDetails(endPos); | ||
return { | ||
start: { | ||
offset: startPos, | ||
line: startPosDetails.line, | ||
column: startPosDetails.column | ||
}, | ||
end: { | ||
offset: endPos, | ||
line: endPosDetails.line, | ||
column: endPosDetails.column | ||
} | ||
}; | ||
peg$posDetailsCache[pos] = details; | ||
return details; | ||
} | ||
} | ||
function peg$fail(expected) { | ||
if (peg$currPos < peg$maxFailPos) { return; } | ||
function peg$computeLocation(startPos, endPos) { | ||
var startPosDetails = peg$computePosDetails(startPos), | ||
endPosDetails = peg$computePosDetails(endPos); | ||
if (peg$currPos > peg$maxFailPos) { | ||
peg$maxFailPos = peg$currPos; | ||
peg$maxFailExpected = []; | ||
return { | ||
start: { | ||
offset: startPos, | ||
line: startPosDetails.line, | ||
column: startPosDetails.column | ||
}, | ||
end: { | ||
offset: endPos, | ||
line: endPosDetails.line, | ||
column: endPosDetails.column | ||
} | ||
}; | ||
} | ||
peg$maxFailExpected.push(expected); | ||
} | ||
function peg$fail(expected) { | ||
if (peg$currPos < peg$maxFailPos) { return; } | ||
function peg$buildSimpleError(message, location) { | ||
return new peg$SyntaxError(message, null, null, location); | ||
if (peg$currPos > peg$maxFailPos) { | ||
peg$maxFailPos = peg$currPos; | ||
peg$maxFailExpected = []; | ||
} | ||
function peg$buildStructuredError(expected, found, location) { | ||
return new peg$SyntaxError( | ||
peg$SyntaxError.buildMessage(expected, found), | ||
expected, | ||
found, | ||
location | ||
); | ||
} | ||
peg$maxFailExpected.push(expected); | ||
} | ||
function peg$parseStart() { | ||
var s0, s1, s2, s3, s4; | ||
function peg$buildSimpleError(message, location) { | ||
return new peg$SyntaxError(message, null, null, location); | ||
} | ||
s0 = peg$currPos; | ||
s1 = []; | ||
function peg$buildStructuredError(expected, found, location) { | ||
return new peg$SyntaxError( | ||
peg$SyntaxError.buildMessage(expected, found), | ||
expected, | ||
found, | ||
location | ||
); | ||
} | ||
function peg$parseStart() { | ||
var s0, s1, s2, s3, s4; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$currPos; | ||
s3 = peg$parse__(); | ||
if (s3 !== peg$FAILED) { | ||
s4 = peg$parseUnit(); | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$currPos; | ||
@@ -359,8 +376,55 @@ s3 = peg$parse__(); | ||
} | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$parse__(); | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c0(s1, s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseUnit() { | ||
var s0, s1, s2, s3, s4; | ||
s0 = peg$parseMacro(); | ||
if (s0 === peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 42) { | ||
s0 = peg$c1; | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c2); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$currPos; | ||
s3 = peg$parse__(); | ||
s3 = peg$currPos; | ||
peg$silentFails++; | ||
s4 = peg$parseBlanks(); | ||
peg$silentFails--; | ||
if (s4 === peg$FAILED) { | ||
s3 = void 0; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s4 = peg$parseUnit(); | ||
if (input.length > peg$currPos) { | ||
s4 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s4 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s4 !== peg$FAILED) { | ||
@@ -377,95 +441,27 @@ s3 = [s3, s4]; | ||
} | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$parse__(); | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c0(s1, s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parseUnit() { | ||
var s0, s1, s2, s3, s4; | ||
s0 = peg$parseMacro(); | ||
if (s0 === peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 42) { | ||
s0 = peg$c1; | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c2); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
peg$silentFails++; | ||
s4 = peg$parseBlanks(); | ||
peg$silentFails--; | ||
if (s4 === peg$FAILED) { | ||
s3 = void 0; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s4 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
peg$silentFails++; | ||
s4 = peg$parseBlanks(); | ||
peg$silentFails--; | ||
if (s4 === peg$FAILED) { | ||
s3 = void 0; | ||
} else { | ||
s4 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$currPos; | ||
s3 = peg$currPos; | ||
peg$silentFails++; | ||
s4 = peg$parseBlanks(); | ||
peg$silentFails--; | ||
if (s4 === peg$FAILED) { | ||
s3 = void 0; | ||
if (s3 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s4 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
s4 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s4 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s4 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
@@ -475,32 +471,45 @@ peg$currPos = s2; | ||
} | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s0 = input.substring(s0, peg$currPos); | ||
} else { | ||
s0 = s1; | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s0 = input.substring(s0, peg$currPos); | ||
} else { | ||
s0 = s1; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseMacro() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
return s0; | ||
} | ||
s0 = peg$currPos; | ||
s1 = peg$currPos; | ||
s2 = peg$currPos; | ||
if (peg$c4.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
function peg$parseMacro() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | ||
s0 = peg$currPos; | ||
s1 = peg$currPos; | ||
s2 = peg$currPos; | ||
if (peg$c4.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c5); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s4 = []; | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c5); } | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s4 = []; | ||
while (s5 !== peg$FAILED) { | ||
s4.push(s5); | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
@@ -513,19 +522,6 @@ s5 = input.charAt(peg$currPos); | ||
} | ||
while (s5 !== peg$FAILED) { | ||
s4.push(s5); | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
} | ||
} | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
} | ||
if (s4 !== peg$FAILED) { | ||
s3 = [s3, s4]; | ||
s2 = s3; | ||
} else { | ||
@@ -535,60 +531,60 @@ peg$currPos = s2; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = input.substring(s1, peg$currPos); | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = input.substring(s1, peg$currPos); | ||
} else { | ||
s1 = s2; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s1 = s2; | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
} | ||
peg$silentFails--; | ||
if (s3 === peg$FAILED) { | ||
s2 = void 0; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$parse__(); | ||
if (s4 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s5 = peg$c8; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c9); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parse__(); | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parseArgumentList(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parse__(); | ||
if (s8 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s9 = peg$c10; | ||
peg$currPos++; | ||
} else { | ||
s9 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c11); } | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
peg$silentFails--; | ||
if (s3 === peg$FAILED) { | ||
s2 = void 0; | ||
} else { | ||
peg$currPos = s2; | ||
s2 = peg$FAILED; | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$parse__(); | ||
if (s4 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 40) { | ||
s5 = peg$c8; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c9); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$parse__(); | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parseArgumentList(); | ||
if (s7 === peg$FAILED) { | ||
s7 = null; | ||
} | ||
if (s7 !== peg$FAILED) { | ||
s8 = peg$parse__(); | ||
if (s8 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 41) { | ||
s9 = peg$c10; | ||
peg$currPos++; | ||
} else { | ||
s9 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c11); } | ||
} | ||
if (s9 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7, s8, s9]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
@@ -613,14 +609,14 @@ s3 = peg$FAILED; | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c12(s1, s3); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = null; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c12(s1, s3); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
@@ -633,13 +629,64 @@ s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseArgumentList() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7; | ||
return s0; | ||
} | ||
s0 = peg$currPos; | ||
s1 = peg$parseArgument(); | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
function peg$parseArgumentList() { | ||
var s0, s1, s2, s3, s4, s5, s6, s7; | ||
s0 = peg$currPos; | ||
s1 = peg$parseArgument(); | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
s5 = peg$parse__(); | ||
if (s5 !== peg$FAILED) { | ||
s4 = input.substring(s4, peg$currPos); | ||
} else { | ||
s4 = s5; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s5 = peg$c13; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$currPos; | ||
s7 = peg$parse__(); | ||
if (s7 !== peg$FAILED) { | ||
s6 = input.substring(s6, peg$currPos); | ||
} else { | ||
s6 = s7; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parseArgument(); | ||
if (s7 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
@@ -690,58 +737,7 @@ s4 = peg$currPos; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
s5 = peg$parse__(); | ||
if (s5 !== peg$FAILED) { | ||
s4 = input.substring(s4, peg$currPos); | ||
} else { | ||
s4 = s5; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 44) { | ||
s5 = peg$c13; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c14); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s6 = peg$currPos; | ||
s7 = peg$parse__(); | ||
if (s7 !== peg$FAILED) { | ||
s6 = input.substring(s6, peg$currPos); | ||
} else { | ||
s6 = s7; | ||
} | ||
if (s6 !== peg$FAILED) { | ||
s7 = peg$parseArgument(); | ||
if (s7 !== peg$FAILED) { | ||
s4 = [s4, s5, s6, s7]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c15(s1, s2); | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c15(s1, s2); | ||
s0 = s1; | ||
} else { | ||
@@ -751,13 +747,46 @@ peg$currPos = s0; | ||
} | ||
return s0; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseArgument() { | ||
var s0, s1, s2; | ||
return s0; | ||
} | ||
s0 = peg$parseMacro(); | ||
function peg$parseArgument() { | ||
var s0, s1, s2; | ||
s0 = peg$parseMacro(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
s1 = peg$parseStringLiteral(); | ||
if (s1 !== peg$FAILED) { | ||
s0 = input.substring(s0, peg$currPos); | ||
} else { | ||
s0 = s1; | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
s1 = peg$parseStringLiteral(); | ||
s1 = []; | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
} | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
@@ -768,50 +797,68 @@ s0 = input.substring(s0, peg$currPos); | ||
} | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseStringLiteral() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s1 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
if (input.substr(peg$currPos, 2) === peg$c20) { | ||
s3 = peg$c20; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s5 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c16.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
} | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
s1 = peg$FAILED; | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s0 = input.substring(s0, peg$currPos); | ||
} else { | ||
s0 = s1; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parseStringLiteral() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s1 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
if (input.substr(peg$currPos, 2) === peg$c20) { | ||
@@ -862,65 +909,14 @@ s3 = peg$c20; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
if (input.substr(peg$currPos, 2) === peg$c20) { | ||
s3 = peg$c20; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s5 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s3 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 34) { | ||
s3 = peg$c18; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s1 = [s1, s2, s3]; | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s1 = [s1, s2, s3]; | ||
s0 = s1; | ||
} else { | ||
@@ -934,110 +930,110 @@ peg$currPos = s0; | ||
} | ||
return s0; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseWhiteSpaces() { | ||
var s0, s1, s2, s3; | ||
return s0; | ||
} | ||
s0 = []; | ||
s1 = []; | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
function peg$parseWhiteSpaces() { | ||
var s0, s1, s2, s3; | ||
s0 = []; | ||
s1 = []; | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 === peg$FAILED) { | ||
s1 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s2 = peg$c24; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = [s2, s3]; | ||
s1 = s2; | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 === peg$FAILED) { | ||
s1 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s2 = peg$c24; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
while (s1 !== peg$FAILED) { | ||
s0.push(s1); | ||
s1 = []; | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = [s2, s3]; | ||
s1 = s2; | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
} | ||
if (s1 !== peg$FAILED) { | ||
while (s1 !== peg$FAILED) { | ||
s0.push(s1); | ||
s1 = []; | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
if (s1 === peg$FAILED) { | ||
s1 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s2 = peg$c24; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c22.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
} | ||
} else { | ||
s1 = peg$FAILED; | ||
} | ||
if (s1 === peg$FAILED) { | ||
s1 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s2 = peg$c24; | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = [s2, s3]; | ||
s1 = s2; | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s2 = [s2, s3]; | ||
s1 = s2; | ||
} else { | ||
@@ -1047,24 +1043,66 @@ peg$currPos = s1; | ||
} | ||
} else { | ||
peg$currPos = s1; | ||
s1 = peg$FAILED; | ||
} | ||
} | ||
} else { | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} else { | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseMultiLineComment() { | ||
var s0, s1, s2, s3, s4, s5; | ||
return s0; | ||
} | ||
s0 = peg$currPos; | ||
if (input.substr(peg$currPos, 2) === peg$c28) { | ||
s1 = peg$c28; | ||
function peg$parseMultiLineComment() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.substr(peg$currPos, 2) === peg$c28) { | ||
s1 = peg$c28; | ||
peg$currPos += 2; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 2) === peg$c30) { | ||
s5 = peg$c30; | ||
peg$currPos += 2; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
@@ -1106,56 +1144,14 @@ s4 = peg$currPos; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (input.substr(peg$currPos, 2) === peg$c30) { | ||
s5 = peg$c30; | ||
peg$currPos += 2; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c30) { | ||
s3 = peg$c30; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (input.substr(peg$currPos, 2) === peg$c30) { | ||
s3 = peg$c30; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s1 = [s1, s2, s3]; | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
if (s3 !== peg$FAILED) { | ||
s1 = [s1, s2, s3]; | ||
s0 = s1; | ||
} else { | ||
@@ -1169,19 +1165,61 @@ peg$currPos = s0; | ||
} | ||
return s0; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseSingleLineComment() { | ||
var s0, s1, s2, s3, s4, s5; | ||
return s0; | ||
} | ||
s0 = peg$currPos; | ||
if (input.substr(peg$currPos, 2) === peg$c32) { | ||
s1 = peg$c32; | ||
peg$currPos += 2; | ||
function peg$parseSingleLineComment() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.substr(peg$currPos, 2) === peg$c32) { | ||
s1 = peg$c32; | ||
peg$currPos += 2; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c33); } | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
@@ -1223,8 +1261,58 @@ s4 = peg$currPos; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = [s1, s2]; | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parsePreprocessorDirective() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 35) { | ||
s1 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
if (input.substr(peg$currPos, 2) === peg$c36) { | ||
s3 = peg$c36; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
@@ -1234,59 +1322,18 @@ peg$currPos++; | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = [s1, s2]; | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
return s0; | ||
} | ||
function peg$parsePreprocessorDirective() { | ||
var s0, s1, s2, s3, s4, s5; | ||
s0 = peg$currPos; | ||
if (input.charCodeAt(peg$currPos) === 35) { | ||
s1 = peg$c34; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c35); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
if (input.substr(peg$currPos, 2) === peg$c36) { | ||
@@ -1337,57 +1384,6 @@ s3 = peg$c36; | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
if (input.substr(peg$currPos, 2) === peg$c36) { | ||
s3 = peg$c36; | ||
peg$currPos += 2; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c37); } | ||
} | ||
if (s3 === peg$FAILED) { | ||
s3 = peg$currPos; | ||
s4 = peg$currPos; | ||
peg$silentFails++; | ||
if (peg$c26.test(input.charAt(peg$currPos))) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c27); } | ||
} | ||
peg$silentFails--; | ||
if (s5 === peg$FAILED) { | ||
s4 = void 0; | ||
} else { | ||
peg$currPos = s4; | ||
s4 = peg$FAILED; | ||
} | ||
if (s4 !== peg$FAILED) { | ||
if (input.length > peg$currPos) { | ||
s5 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
} else { | ||
s5 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c3); } | ||
} | ||
if (s5 !== peg$FAILED) { | ||
s4 = [s4, s5]; | ||
s3 = s4; | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} else { | ||
peg$currPos = s3; | ||
s3 = peg$FAILED; | ||
} | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = [s1, s2]; | ||
s0 = s1; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
} | ||
if (s2 !== peg$FAILED) { | ||
s1 = [s1, s2]; | ||
s0 = s1; | ||
} else { | ||
@@ -1397,65 +1393,68 @@ peg$currPos = s0; | ||
} | ||
return s0; | ||
} else { | ||
peg$currPos = s0; | ||
s0 = peg$FAILED; | ||
} | ||
function peg$parseBlanks() { | ||
var s0; | ||
return s0; | ||
} | ||
s0 = peg$parseWhiteSpaces(); | ||
function peg$parseBlanks() { | ||
var s0; | ||
s0 = peg$parseWhiteSpaces(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseMultiLineComment(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseMultiLineComment(); | ||
s0 = peg$parseSingleLineComment(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parseSingleLineComment(); | ||
if (s0 === peg$FAILED) { | ||
s0 = peg$parsePreprocessorDirective(); | ||
} | ||
s0 = peg$parsePreprocessorDirective(); | ||
} | ||
} | ||
return s0; | ||
} | ||
function peg$parse__() { | ||
var s0, s1, s2; | ||
return s0; | ||
} | ||
s0 = peg$currPos; | ||
s1 = []; | ||
function peg$parse__() { | ||
var s0, s1, s2; | ||
s0 = peg$currPos; | ||
s1 = []; | ||
s2 = peg$parseBlanks(); | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parseBlanks(); | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
s2 = peg$parseBlanks(); | ||
} | ||
if (s1 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c38(); | ||
} | ||
s0 = s1; | ||
return s0; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c38(); | ||
} | ||
s0 = s1; | ||
peg$result = peg$startRuleFunction(); | ||
return s0; | ||
} | ||
if (peg$result !== peg$FAILED && peg$currPos === input.length) { | ||
return peg$result; | ||
} else { | ||
if (peg$result !== peg$FAILED && peg$currPos < input.length) { | ||
peg$fail(peg$endExpectation()); | ||
} | ||
peg$result = peg$startRuleFunction(); | ||
throw peg$buildStructuredError( | ||
peg$maxFailExpected, | ||
peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, | ||
peg$maxFailPos < input.length | ||
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) | ||
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos) | ||
); | ||
if (peg$result !== peg$FAILED && peg$currPos === input.length) { | ||
return peg$result; | ||
} else { | ||
if (peg$result !== peg$FAILED && peg$currPos < input.length) { | ||
peg$fail(peg$endExpectation()); | ||
} | ||
throw peg$buildStructuredError( | ||
peg$maxFailExpected, | ||
peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, | ||
peg$maxFailPos < input.length | ||
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) | ||
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos) | ||
); | ||
} | ||
} | ||
return { | ||
SyntaxError: peg$SyntaxError, | ||
parse: peg$parse | ||
}; | ||
})() | ||
module.exports = { | ||
SyntaxError: peg$SyntaxError, | ||
parse: peg$parse | ||
}; |
@@ -132,2 +132,3 @@ module.exports = (function(){ | ||
result.kind = TypeInfo.KIND_STRUCT; | ||
result.name = structSpec.tagName; | ||
result.tagName = structSpec.tagName; | ||
@@ -134,0 +135,0 @@ return result; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
704194
24608
+ Addednode-getopt@0.3.2(transitive)
- Removednode-getopt@0.2.4(transitive)
Updatednode-getopt@^0.3.2