Last active
August 29, 2015 14:20
-
-
Save lorenzoongithub/437dca48f4d83155c9da to your computer and use it in GitHub Desktop.
esprima.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// esprima is a formidable javascript parser written in javascript | |
// | |
// http://esprima.org | |
// | |
// The following code was derived from here | |
// https://raw.githubusercontent.com/marijnh/acorn/master/test/tests.js | |
// | |
load('http://esprima.org/esprima.js'); | |
//1 | |
x = esprima.parse( "this\n"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.type !== "ThisExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 2 | |
x = esprima.parse( "null\n"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "null") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== null) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 3 | |
x = esprima.parse( "\n 42\n\n"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 4 | |
x = esprima.parse( "/foobar/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "/foobar/") throw ""; | |
if (x.body[0].expression.regex === undefined) throw ""; | |
if (x.body[0].expression.regex.flags !== "") throw ""; | |
if (x.body[0].expression.regex.pattern !== "foobar") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value === undefined) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 5 | |
x = esprima.parse( "/[a-z]/g"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "/[a-z]/g") throw ""; | |
if (x.body[0].expression.regex === undefined) throw ""; | |
if (x.body[0].expression.regex.flags !== "g") throw ""; | |
if (x.body[0].expression.regex.pattern !== "[a-z]") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value === undefined) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 6 | |
x = esprima.parse( "(1 + 2 ) * 3"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.raw !== "1") throw ""; | |
if (x.body[0].expression.left.left.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.left.value !== 1) throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.raw !== "2") throw ""; | |
if (x.body[0].expression.left.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.right.value !== 2) throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "*") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "3") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 3) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 7 | |
x = esprima.parse( "(1 + 2 ) * 3"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.raw !== "1") throw ""; | |
if (x.body[0].expression.left.left.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.left.value !== 1) throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.raw !== "2") throw ""; | |
if (x.body[0].expression.left.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.right.value !== 2) throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "*") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "3") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 3) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 8 | |
x = esprima.parse( "(x) = 23"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "23") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 23) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 9 | |
x = esprima.parse( "x = []"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 10 | |
x = esprima.parse( "x = [ ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 11 | |
x = esprima.parse( "x = [ 42 ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0].raw !== "42") throw ""; | |
if (x.body[0].expression.right.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[0].value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 12 | |
x = esprima.parse( "x = [ 42, ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0].raw !== "42") throw ""; | |
if (x.body[0].expression.right.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[0].value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 13 | |
x = esprima.parse( "x = [ ,, 42 ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0] !== null) throw ""; | |
if (x.body[0].expression.right.elements[1] !== null) throw ""; | |
if (x.body[0].expression.right.elements[2] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[2].raw !== "42") throw ""; | |
if (x.body[0].expression.right.elements[2].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[2].value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 14 | |
x = esprima.parse( "x = [ 1, 2, 3, ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0].raw !== "1") throw ""; | |
if (x.body[0].expression.right.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[0].value !== 1) throw ""; | |
if (x.body[0].expression.right.elements[1] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[1].raw !== "2") throw ""; | |
if (x.body[0].expression.right.elements[1].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[1].value !== 2) throw ""; | |
if (x.body[0].expression.right.elements[2] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[2].raw !== "3") throw ""; | |
if (x.body[0].expression.right.elements[2].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[2].value !== 3) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 15 | |
x = esprima.parse( "x = [ 1, 2,, 3, ]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[0].raw !== "1") throw ""; | |
if (x.body[0].expression.right.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[0].value !== 1) throw ""; | |
if (x.body[0].expression.right.elements[1] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[1].raw !== "2") throw ""; | |
if (x.body[0].expression.right.elements[1].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[1].value !== 2) throw ""; | |
if (x.body[0].expression.right.elements[2] !== null) throw ""; | |
if (x.body[0].expression.right.elements[3] === undefined) throw ""; | |
if (x.body[0].expression.right.elements[3].raw !== "3") throw ""; | |
if (x.body[0].expression.right.elements[3].type !== "Literal") throw ""; | |
if (x.body[0].expression.right.elements[3].value !== 3) throw ""; | |
if (x.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 16 | |
x = esprima.parse( "x = {}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 17 | |
x = esprima.parse( "x = { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 18 | |
x = esprima.parse( "x = { answer: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "answer") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 19 | |
x = esprima.parse( "x = { if: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "if") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 20 | |
x = esprima.parse( "x = { true: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "true") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 21 | |
x = esprima.parse( "x = { false: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "false") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 22 | |
x = esprima.parse( "x = { null: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "null") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 23 | |
x = esprima.parse( "x = { \"answer\": 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.raw !== "\"answer\"") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].key.value !== "answer") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 24 | |
x = esprima.parse( "x = { x: 1, x: 2 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "x") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "1") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 1) throw ""; | |
if (x.body[0].expression.right.properties[1] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[1].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[1].key.name !== "x") throw ""; | |
if (x.body[0].expression.right.properties[1].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[1].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[1].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[1].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[1].value.raw !== "2") throw ""; | |
if (x.body[0].expression.right.properties[1].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[1].value.value !== 2) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 25 | |
x = esprima.parse( "x = { get width() { return m_width } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "width") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].argument.name !== "m_width") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 26 | |
x = esprima.parse( "x = { get undef() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "undef") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 27 | |
x = esprima.parse( "x = { get if() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "if") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 28 | |
x = esprima.parse( "x = { get true() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "true") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 29 | |
x = esprima.parse( "x = { get false() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "false") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 30 | |
x = esprima.parse( "x = { get null() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "null") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 31 | |
x = esprima.parse( "x = { get \"undef\"() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.raw !== "\"undef\"") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].key.value !== "undef") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 32 | |
x = esprima.parse( "x = { get 10() {} }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.raw !== "10") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].key.value !== 10) throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 33 | |
x = esprima.parse( "x = { set width(w) { m_width = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "width") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_width") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 34 | |
x = esprima.parse( "x = { set if(w) { m_if = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "if") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_if") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 35 | |
x = esprima.parse( "x = { set true(w) { m_true = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "true") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_true") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 36 | |
x = esprima.parse( "x = { set false(w) { m_false = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "false") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_false") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 37 | |
x = esprima.parse( "x = { set null(w) { m_null = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "null") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_null") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 38 | |
x = esprima.parse( "x = { set \"null\"(w) { m_null = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.raw !== "\"null\"") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].key.value !== "null") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_null") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 39 | |
x = esprima.parse( "x = { set 10(w) { m_null = w } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.raw !== "10") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].key.value !== 10) throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.name !== "m_null") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.right.properties[0].value.defaults === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.id !== null) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].name !== "w") throw ""; | |
if (x.body[0].expression.right.properties[0].value.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 40 | |
x = esprima.parse( "x = { get: 42 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "get") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "42") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 42) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 41 | |
x = esprima.parse( "x = { set: 43 }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.properties === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].key.name !== "set") throw ""; | |
if (x.body[0].expression.right.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.right.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.right.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.right.properties[0].value.raw !== "43") throw ""; | |
if (x.body[0].expression.right.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.properties[0].value.value !== 43) throw ""; | |
if (x.body[0].expression.right.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 42 | |
x = esprima.parse( "/* block comment */ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 43 | |
x = esprima.parse( "42 /*The*/ /*Answer*/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 44 | |
x = esprima.parse( "42 /*the*/ /*answer*/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 45 | |
x = esprima.parse( "/* multiline\ncomment\nshould\nbe\nignored */ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 46 | |
x = esprima.parse( "/*a\r\nb*/ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 47 | |
x = esprima.parse( "/*a\rb*/ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 48 | |
x = esprima.parse( "/*a\nb*/ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 49 | |
x = esprima.parse( "/*a\nc*/ 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 50 | |
x = esprima.parse( "// line comment\n42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 51 | |
x = esprima.parse( "42 // line comment"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 52 | |
x = esprima.parse( "// Hello, world!\n42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 53 | |
x = esprima.parse( "// Hello, world!\n"); | |
if (x.body === undefined) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 54 | |
x = esprima.parse( "// Hallo, world!\n"); | |
if (x.body === undefined) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 55 | |
x = esprima.parse( "//\n42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 56 | |
x = esprima.parse( "//"); | |
if (x.body === undefined) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 57 | |
x = esprima.parse( "// "); | |
if (x.body === undefined) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 58 | |
x = esprima.parse( "/**/42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 59 | |
x = esprima.parse( "// Hello, world!\n\n// Another hello\n42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 60 | |
x = esprima.parse( "if (x) { // Some comment\ndoThat(); }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.body === undefined) throw ""; | |
if (x.body[0].consequent.body[0] === undefined) throw ""; | |
if (x.body[0].consequent.body[0].expression === undefined) throw ""; | |
if (x.body[0].consequent.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].consequent.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].consequent.body[0].expression.callee.name !== "doThat") throw ""; | |
if (x.body[0].consequent.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].consequent.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].consequent.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].consequent.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "x") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 61 | |
x = esprima.parse( "switch (answer) { case 42: /* perfect */ bingo() }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].cases === undefined) throw ""; | |
if (x.body[0].cases[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.name !== "bingo") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].cases[0].consequent[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].cases[0].test === undefined) throw ""; | |
if (x.body[0].cases[0].test.raw !== "42") throw ""; | |
if (x.body[0].cases[0].test.type !== "Literal") throw ""; | |
if (x.body[0].cases[0].test.value !== 42) throw ""; | |
if (x.body[0].cases[0].type !== "SwitchCase") throw ""; | |
if (x.body[0].discriminant === undefined) throw ""; | |
if (x.body[0].discriminant.name !== "answer") throw ""; | |
if (x.body[0].discriminant.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "SwitchStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 62 | |
x = esprima.parse( "0"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 0) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 63 | |
x = esprima.parse( "3"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "3") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 3) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 64 | |
x = esprima.parse( "5"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "5") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 5) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 65 | |
x = esprima.parse( "42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "42") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 42) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 66 | |
x = esprima.parse( ".14"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== ".14") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 0.14) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 67 | |
x = esprima.parse( "3.14159"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "3.14159") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 3.14159) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 68 | |
x = esprima.parse( "6.02214179e+23"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "6.02214179e+23") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 6.02214179e+23) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 69 | |
x = esprima.parse( "1.492417830e-10"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "1.492417830e-10") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 1.49241783e-10) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 70 | |
x = esprima.parse( "0x0"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0x0") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 0) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 71 | |
x = esprima.parse( "0e+100"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0e+100") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 0) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 72 | |
x = esprima.parse( "0xabc"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0xabc") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 2748) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 73 | |
x = esprima.parse( "0xdef"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0xdef") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 3567) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 74 | |
x = esprima.parse( "0X1A"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0X1A") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 26) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 75 | |
x = esprima.parse( "0x10"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0x10") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 16) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 76 | |
x = esprima.parse( "0x100"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0x100") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 256) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 77 | |
x = esprima.parse( "0X04"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0X04") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 4) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 78 | |
x = esprima.parse( "02"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "02") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 2) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 79 | |
x = esprima.parse( "012"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "012") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 10) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 80 | |
x = esprima.parse( "0012"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "0012") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== 10) throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 81 | |
x = esprima.parse( "\"Hello\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 82 | |
x = esprima.parse( "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "\n\r\t\u000b\b\f\\'\"\u0000") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 83 | |
x = esprima.parse( "\"\\u0061\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"\\u0061\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "a") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 84 | |
x = esprima.parse( "\"\\x61\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"\\x61\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "a") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 85 | |
x = esprima.parse( "\"Hello\\nworld\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\nworld\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\nworld") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 86 | |
x = esprima.parse( "\"Hello\\\nworld\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\\nworld\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Helloworld") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 87 | |
x = esprima.parse( "\"Hello\\02World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\02World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\u0002World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 88 | |
x = esprima.parse( "\"Hello\\012World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\012World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\nWorld") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 89 | |
x = esprima.parse( "\"Hello\\122World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\122World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "HelloRWorld") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 90 | |
x = esprima.parse( "\"Hello\\0122World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\0122World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\n2World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 92 | |
x = esprima.parse( "\"Hello\\412World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\412World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello!2World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 93 | |
x = esprima.parse( "\"Hello\\712World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\712World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello92World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 94 | |
x = esprima.parse( "\"Hello\\0World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\0World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\u0000World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 95 | |
x = esprima.parse( "\"Hello\\\r\nworld\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\\r\nworld\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Helloworld") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 96 | |
x = esprima.parse( "\"Hello\\1World\""); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "\"Hello\\1World\"") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "Hello\u0001World") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 97 | |
x = esprima.parse( "var x = /[a-z]/i"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/[a-z]/i") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "i") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "[a-z]") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 98 | |
x = esprima.parse( "var x = /[x-z]/i"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/[x-z]/i") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "i") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "[x-z]") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 99 | |
x = esprima.parse( "var x = /[a-c]/i"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/[a-c]/i") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "i") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "[a-c]") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 100 | |
x = esprima.parse( "var x = /[P QR]/i"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/[P QR]/i") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "i") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "[P QR]") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 101 | |
x = esprima.parse( "var x = /foo\\/bar/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/foo\\/bar/") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "foo\\/bar") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 102 | |
x = esprima.parse( "var x = /=([^=\\s])+/g"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "/=([^=\\s])+/g") throw ""; | |
if (x.body[0].declarations[0].init.regex === undefined) throw ""; | |
if (x.body[0].declarations[0].init.regex.flags !== "g") throw ""; | |
if (x.body[0].declarations[0].init.regex.pattern !== "=([^=\\s])+") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value === undefined) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 103 | |
x = esprima.parse( "new Button"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.name !== "Button") throw ""; | |
if (x.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 104 | |
x = esprima.parse( "new Button()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.name !== "Button") throw ""; | |
if (x.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 105 | |
x = esprima.parse( "new new foo"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "NewExpression") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 106 | |
x = esprima.parse( "new new foo()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "NewExpression") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 107 | |
x = esprima.parse( "new foo().bar()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee.object.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.object.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.object.type !== "NewExpression") throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "bar") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 108 | |
x = esprima.parse( "new foo[bar]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "bar") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 109 | |
x = esprima.parse( "new foo.bar()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "bar") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "NewExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 110 | |
x = esprima.parse( "( new foo).bar()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee.object.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.object.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.object.type !== "NewExpression") throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "bar") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 111 | |
x = esprima.parse( "foo(bar, baz)"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.arguments[0].name !== "bar") throw ""; | |
if (x.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.arguments[1] === undefined) throw ""; | |
if (x.body[0].expression.arguments[1].name !== "baz") throw ""; | |
if (x.body[0].expression.arguments[1].type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 112 | |
x = esprima.parse( "( foo )()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.name !== "foo") throw ""; | |
if (x.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 113 | |
x = esprima.parse( "universe.milkyway"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "milkyway") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 114 | |
x = esprima.parse( "universe.milkyway.solarsystem"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.object === undefined) throw ""; | |
if (x.body[0].expression.object.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.property === undefined) throw ""; | |
if (x.body[0].expression.object.property.name !== "milkyway") throw ""; | |
if (x.body[0].expression.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "solarsystem") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 115 | |
x = esprima.parse( "universe.milkyway.solarsystem.Earth"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.object === undefined) throw ""; | |
if (x.body[0].expression.object.object.object === undefined) throw ""; | |
if (x.body[0].expression.object.object.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.object.property === undefined) throw ""; | |
if (x.body[0].expression.object.object.property.name !== "milkyway") throw ""; | |
if (x.body[0].expression.object.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.object.property === undefined) throw ""; | |
if (x.body[0].expression.object.property.name !== "solarsystem") throw ""; | |
if (x.body[0].expression.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "Earth") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 116 | |
x = esprima.parse( "universe[galaxyName, otherUselessName]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.expressions === undefined) throw ""; | |
if (x.body[0].expression.property.expressions[0] === undefined) throw ""; | |
if (x.body[0].expression.property.expressions[0].name !== "galaxyName") throw ""; | |
if (x.body[0].expression.property.expressions[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.property.expressions[1] === undefined) throw ""; | |
if (x.body[0].expression.property.expressions[1].name !== "otherUselessName") throw ""; | |
if (x.body[0].expression.property.expressions[1].type !== "Identifier") throw ""; | |
if (x.body[0].expression.property.type !== "SequenceExpression") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 117 | |
x = esprima.parse( "universe[galaxyName]"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "galaxyName") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 118 | |
x = esprima.parse( "universe[42].galaxies"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.object === undefined) throw ""; | |
if (x.body[0].expression.object.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.property === undefined) throw ""; | |
if (x.body[0].expression.object.property.raw !== "42") throw ""; | |
if (x.body[0].expression.object.property.type !== "Literal") throw ""; | |
if (x.body[0].expression.object.property.value !== 42) throw ""; | |
if (x.body[0].expression.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "galaxies") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 119 | |
x = esprima.parse( "universe(42).galaxies"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.arguments === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[0].raw !== "42") throw ""; | |
if (x.body[0].expression.object.arguments[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.object.arguments[0].value !== 42) throw ""; | |
if (x.body[0].expression.object.callee === undefined) throw ""; | |
if (x.body[0].expression.object.callee.name !== "universe") throw ""; | |
if (x.body[0].expression.object.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.type !== "CallExpression") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "galaxies") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 120 | |
x = esprima.parse( "universe(42).galaxies(14, 3, 77).milkyway"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.arguments === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[0].raw !== "14") throw ""; | |
if (x.body[0].expression.object.arguments[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.object.arguments[0].value !== 14) throw ""; | |
if (x.body[0].expression.object.arguments[1] === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[1].raw !== "3") throw ""; | |
if (x.body[0].expression.object.arguments[1].type !== "Literal") throw ""; | |
if (x.body[0].expression.object.arguments[1].value !== 3) throw ""; | |
if (x.body[0].expression.object.arguments[2] === undefined) throw ""; | |
if (x.body[0].expression.object.arguments[2].raw !== "77") throw ""; | |
if (x.body[0].expression.object.arguments[2].type !== "Literal") throw ""; | |
if (x.body[0].expression.object.arguments[2].value !== 77) throw ""; | |
if (x.body[0].expression.object.callee === undefined) throw ""; | |
if (x.body[0].expression.object.callee.object === undefined) throw ""; | |
if (x.body[0].expression.object.callee.object.arguments === undefined) throw ""; | |
if (x.body[0].expression.object.callee.object.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.object.callee.object.arguments[0].raw !== "42") throw ""; | |
if (x.body[0].expression.object.callee.object.arguments[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.object.callee.object.arguments[0].value !== 42) throw ""; | |
if (x.body[0].expression.object.callee.object.callee === undefined) throw ""; | |
if (x.body[0].expression.object.callee.object.callee.name !== "universe") throw ""; | |
if (x.body[0].expression.object.callee.object.callee.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.callee.object.type !== "CallExpression") throw ""; | |
if (x.body[0].expression.object.callee.property === undefined) throw ""; | |
if (x.body[0].expression.object.callee.property.name !== "galaxies") throw ""; | |
if (x.body[0].expression.object.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.object.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.object.type !== "CallExpression") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "milkyway") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 121 | |
x = esprima.parse( "earth.asia.Indonesia.prepareForElection(2014)"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.arguments[0].raw !== "2014") throw ""; | |
if (x.body[0].expression.arguments[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.arguments[0].value !== 2014) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.object.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.object.object.name !== "earth") throw ""; | |
if (x.body[0].expression.callee.object.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.object.object.property === undefined) throw ""; | |
if (x.body[0].expression.callee.object.object.property.name !== "asia") throw ""; | |
if (x.body[0].expression.callee.object.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.object.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.callee.object.property === undefined) throw ""; | |
if (x.body[0].expression.callee.object.property.name !== "Indonesia") throw ""; | |
if (x.body[0].expression.callee.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "prepareForElection") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 122 | |
x = esprima.parse( "universe.if"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "if") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 123 | |
x = esprima.parse( "universe.true"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "true") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 124 | |
x = esprima.parse( "universe.false"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "false") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 125 | |
x = esprima.parse( "universe.null"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "universe") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "null") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 126 | |
x = esprima.parse( "x++"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 127 | |
x = esprima.parse( "x--"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 128 | |
x = esprima.parse( "eval++"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "eval") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 129 | |
x = esprima.parse( "eval--"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "eval") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 130 | |
x = esprima.parse( "arguments++"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "arguments") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 131 | |
x = esprima.parse( "arguments--"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "arguments") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 132 | |
x = esprima.parse( "++x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 133 | |
x = esprima.parse( "--x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 134 | |
x = esprima.parse( "++eval"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "eval") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 135 | |
x = esprima.parse( "--eval"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "eval") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 136 | |
x = esprima.parse( "++arguments"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "arguments") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 137 | |
x = esprima.parse( "--arguments"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "arguments") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "--") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 138 | |
x = esprima.parse( "+x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 139 | |
x = esprima.parse( "-x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "-") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 140 | |
x = esprima.parse( "~x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "~") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 141 | |
x = esprima.parse( "!x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "!") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 142 | |
x = esprima.parse( "void x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "void") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 143 | |
x = esprima.parse( "delete x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "delete") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 144 | |
x = esprima.parse( "typeof x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "typeof") throw ""; | |
if (x.body[0].expression.type !== "UnaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 145 | |
x = esprima.parse( "x * y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "*") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 146 | |
x = esprima.parse( "x / y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 147 | |
x = esprima.parse( "x % y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "%") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 148 | |
x = esprima.parse( "x + y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 149 | |
x = esprima.parse( "x - y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "-") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 150 | |
x = esprima.parse( "x << y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "<<") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 151 | |
x = esprima.parse( "x >> y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">>") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 152 | |
x = esprima.parse( "x >>> y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">>>") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 153 | |
x = esprima.parse( "x < y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "<") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 154 | |
x = esprima.parse( "x > y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 155 | |
x = esprima.parse( "x <= y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "<=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 156 | |
x = esprima.parse( "x >= y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 157 | |
x = esprima.parse( "x in y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "in") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 158 | |
x = esprima.parse( "x instanceof y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "instanceof") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 159 | |
x = esprima.parse( "x < y < z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "<") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "<") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 160 | |
x = esprima.parse( "x == y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "==") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 161 | |
x = esprima.parse( "x != y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "!=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 162 | |
x = esprima.parse( "x === y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "===") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 163 | |
x = esprima.parse( "x !== y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "!==") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 164 | |
x = esprima.parse( "x & y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "&") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 165 | |
x = esprima.parse( "x ^ y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "^") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 166 | |
x = esprima.parse( "x | y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "|") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 167 | |
x = esprima.parse( "x + y + z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 168 | |
x = esprima.parse( "x - y + z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "-") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 169 | |
x = esprima.parse( "x + y - z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "-") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 170 | |
x = esprima.parse( "x - y - z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "-") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "-") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 171 | |
x = esprima.parse( "x + y * z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "*") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 172 | |
x = esprima.parse( "x + y / z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "/") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 173 | |
x = esprima.parse( "x - y % z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "-") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "%") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 174 | |
x = esprima.parse( "x * y * z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "*") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "*") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 175 | |
x = esprima.parse( "x * y / z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "*") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 176 | |
x = esprima.parse( "x * y % z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "*") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "%") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 177 | |
x = esprima.parse( "x % y * z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "%") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "*") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 178 | |
x = esprima.parse( "x << y << z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "<<") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "<<") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 179 | |
x = esprima.parse( "x | y | z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "|") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "|") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 180 | |
x = esprima.parse( "x & y & z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "&") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "&") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 181 | |
x = esprima.parse( "x ^ y ^ z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "^") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "^") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 182 | |
x = esprima.parse( "x & y | z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "&") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "|") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 183 | |
x = esprima.parse( "x | y ^ z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "|") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "^") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 184 | |
x = esprima.parse( "x | y & z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "|") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "&") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 185 | |
x = esprima.parse( "x || y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "||") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 186 | |
x = esprima.parse( "x && y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "&&") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "y") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 187 | |
x = esprima.parse( "x || y || z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "||") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "LogicalExpression") throw ""; | |
if (x.body[0].expression.operator !== "||") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 188 | |
x = esprima.parse( "x && y && z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.operator !== "&&") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.name !== "y") throw ""; | |
if (x.body[0].expression.left.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "LogicalExpression") throw ""; | |
if (x.body[0].expression.operator !== "&&") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 189 | |
x = esprima.parse( "x || y && z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "||") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "&&") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "LogicalExpression") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 190 | |
x = esprima.parse( "x || y ^ z"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "||") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.operator !== "^") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.name !== "z") throw ""; | |
if (x.body[0].expression.right.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "LogicalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 191 | |
x = esprima.parse( "y ? 1 : 2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.alternate === undefined) throw ""; | |
if (x.body[0].expression.alternate.raw !== "2") throw ""; | |
if (x.body[0].expression.alternate.type !== "Literal") throw ""; | |
if (x.body[0].expression.alternate.value !== 2) throw ""; | |
if (x.body[0].expression.consequent === undefined) throw ""; | |
if (x.body[0].expression.consequent.raw !== "1") throw ""; | |
if (x.body[0].expression.consequent.type !== "Literal") throw ""; | |
if (x.body[0].expression.consequent.value !== 1) throw ""; | |
if (x.body[0].expression.test === undefined) throw ""; | |
if (x.body[0].expression.test.name !== "y") throw ""; | |
if (x.body[0].expression.test.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "ConditionalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 192 | |
x = esprima.parse( "x && y ? 1 : 2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.alternate === undefined) throw ""; | |
if (x.body[0].expression.alternate.raw !== "2") throw ""; | |
if (x.body[0].expression.alternate.type !== "Literal") throw ""; | |
if (x.body[0].expression.alternate.value !== 2) throw ""; | |
if (x.body[0].expression.consequent === undefined) throw ""; | |
if (x.body[0].expression.consequent.raw !== "1") throw ""; | |
if (x.body[0].expression.consequent.type !== "Literal") throw ""; | |
if (x.body[0].expression.consequent.value !== 1) throw ""; | |
if (x.body[0].expression.test === undefined) throw ""; | |
if (x.body[0].expression.test.left === undefined) throw ""; | |
if (x.body[0].expression.test.left.name !== "x") throw ""; | |
if (x.body[0].expression.test.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.test.operator !== "&&") throw ""; | |
if (x.body[0].expression.test.right === undefined) throw ""; | |
if (x.body[0].expression.test.right.name !== "y") throw ""; | |
if (x.body[0].expression.test.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.test.type !== "LogicalExpression") throw ""; | |
if (x.body[0].expression.type !== "ConditionalExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 193 | |
x = esprima.parse( "x = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 194 | |
x = esprima.parse( "eval = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "eval") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 195 | |
x = esprima.parse( "arguments = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "arguments") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 196 | |
x = esprima.parse( "x *= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "*=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 197 | |
x = esprima.parse( "x /= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "/=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 198 | |
x = esprima.parse( "x %= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "%=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 199 | |
x = esprima.parse( "x += 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 200 | |
x = esprima.parse( "x -= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "-=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 201 | |
x = esprima.parse( "x <<= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "<<=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 202 | |
x = esprima.parse( "x >>= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">>=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 203 | |
x = esprima.parse( "x >>>= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== ">>>=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 204 | |
x = esprima.parse( "x &= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "&=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 205 | |
x = esprima.parse( "x ^= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "^=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 206 | |
x = esprima.parse( "x |= 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "|=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "42") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 42) throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 207 | |
x = esprima.parse( "{ foo }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression === undefined) throw ""; | |
if (x.body[0].body[0].expression.name !== "foo") throw ""; | |
if (x.body[0].body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 208 | |
x = esprima.parse( "{ doThis(); doThat(); }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression === undefined) throw ""; | |
if (x.body[0].body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].body[0].expression.callee.name !== "doThis") throw ""; | |
if (x.body[0].body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.arguments === undefined) throw ""; | |
if (x.body[0].body[1].expression.callee === undefined) throw ""; | |
if (x.body[0].body[1].expression.callee.name !== "doThat") throw ""; | |
if (x.body[0].body[1].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 209 | |
x = esprima.parse( "{}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 210 | |
x = esprima.parse( "var x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 211 | |
x = esprima.parse( "var x, y;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init !== null) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 212 | |
x = esprima.parse( "var x = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 213 | |
x = esprima.parse( "var eval = 42, arguments = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "eval") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "arguments") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 42) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 214 | |
x = esprima.parse( "var x = 14, y = 3, z = 1977"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "14") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 14) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "3") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 3) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[2] === undefined) throw ""; | |
if (x.body[0].declarations[2].id === undefined) throw ""; | |
if (x.body[0].declarations[2].id.name !== "z") throw ""; | |
if (x.body[0].declarations[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[2].init === undefined) throw ""; | |
if (x.body[0].declarations[2].init.raw !== "1977") throw ""; | |
if (x.body[0].declarations[2].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[2].init.value !== 1977) throw ""; | |
if (x.body[0].declarations[2].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 215 | |
x = esprima.parse( "var implements, interface, package"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "implements") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "interface") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init !== null) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[2] === undefined) throw ""; | |
if (x.body[0].declarations[2].id === undefined) throw ""; | |
if (x.body[0].declarations[2].id.name !== "package") throw ""; | |
if (x.body[0].declarations[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[2].init !== null) throw ""; | |
if (x.body[0].declarations[2].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 216 | |
x = esprima.parse( "var private, protected, public, static"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "private") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "protected") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init !== null) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[2] === undefined) throw ""; | |
if (x.body[0].declarations[2].id === undefined) throw ""; | |
if (x.body[0].declarations[2].id.name !== "public") throw ""; | |
if (x.body[0].declarations[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[2].init !== null) throw ""; | |
if (x.body[0].declarations[2].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[3] === undefined) throw ""; | |
if (x.body[0].declarations[3].id === undefined) throw ""; | |
if (x.body[0].declarations[3].id.name !== "static") throw ""; | |
if (x.body[0].declarations[3].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[3].init !== null) throw ""; | |
if (x.body[0].declarations[3].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 217 | |
x = esprima.parse( ";"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].type !== "EmptyStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 218 | |
x = esprima.parse( "x"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.name !== "x") throw ""; | |
if (x.body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 219 | |
x = esprima.parse( "x, y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.expressions === undefined) throw ""; | |
if (x.body[0].expression.expressions[0] === undefined) throw ""; | |
if (x.body[0].expression.expressions[0].name !== "x") throw ""; | |
if (x.body[0].expression.expressions[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.expressions[1] === undefined) throw ""; | |
if (x.body[0].expression.expressions[1].name !== "y") throw ""; | |
if (x.body[0].expression.expressions[1].type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "SequenceExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 220 | |
x = esprima.parse( "\\u0061"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.name !== "a") throw ""; | |
if (x.body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 221 | |
x = esprima.parse( "a\\u0061"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.name !== "aa") throw ""; | |
if (x.body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 222 | |
x = esprima.parse( "if (morning) goodMorning()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.expression === undefined) throw ""; | |
if (x.body[0].consequent.expression.arguments === undefined) throw ""; | |
if (x.body[0].consequent.expression.callee === undefined) throw ""; | |
if (x.body[0].consequent.expression.callee.name !== "goodMorning") throw ""; | |
if (x.body[0].consequent.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].consequent.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].consequent.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "morning") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 223 | |
x = esprima.parse( "if (morning) (function(){})"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.expression === undefined) throw ""; | |
if (x.body[0].consequent.expression.body === undefined) throw ""; | |
if (x.body[0].consequent.expression.body.body === undefined) throw ""; | |
if (x.body[0].consequent.expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].consequent.expression.defaults === undefined) throw ""; | |
if (x.body[0].consequent.expression.id !== null) throw ""; | |
if (x.body[0].consequent.expression.params === undefined) throw ""; | |
if (x.body[0].consequent.expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].consequent.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "morning") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 224 | |
x = esprima.parse( "if (morning) var x = 0;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.declarations === undefined) throw ""; | |
if (x.body[0].consequent.declarations[0] === undefined) throw ""; | |
if (x.body[0].consequent.declarations[0].id === undefined) throw ""; | |
if (x.body[0].consequent.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].consequent.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].consequent.declarations[0].init === undefined) throw ""; | |
if (x.body[0].consequent.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].consequent.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].consequent.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].consequent.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].consequent.kind !== "var") throw ""; | |
if (x.body[0].consequent.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "morning") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 225 | |
x = esprima.parse( "if (morning) function a(){}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.body === undefined) throw ""; | |
if (x.body[0].consequent.body.body === undefined) throw ""; | |
if (x.body[0].consequent.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].consequent.defaults === undefined) throw ""; | |
if (x.body[0].consequent.id === undefined) throw ""; | |
if (x.body[0].consequent.id.name !== "a") throw ""; | |
if (x.body[0].consequent.id.type !== "Identifier") throw ""; | |
if (x.body[0].consequent.params === undefined) throw ""; | |
if (x.body[0].consequent.type !== "FunctionDeclaration") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "morning") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 226 | |
x = esprima.parse( "if (morning) goodMorning(); else goodDay()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate === undefined) throw ""; | |
if (x.body[0].alternate.expression === undefined) throw ""; | |
if (x.body[0].alternate.expression.arguments === undefined) throw ""; | |
if (x.body[0].alternate.expression.callee === undefined) throw ""; | |
if (x.body[0].alternate.expression.callee.name !== "goodDay") throw ""; | |
if (x.body[0].alternate.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].alternate.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].alternate.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.expression === undefined) throw ""; | |
if (x.body[0].consequent.expression.arguments === undefined) throw ""; | |
if (x.body[0].consequent.expression.callee === undefined) throw ""; | |
if (x.body[0].consequent.expression.callee.name !== "goodMorning") throw ""; | |
if (x.body[0].consequent.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].consequent.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].consequent.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.name !== "morning") throw ""; | |
if (x.body[0].test.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 227 | |
x = esprima.parse( "do keep(); while (true)"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "keep") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "DoWhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 228 | |
x = esprima.parse( "do keep(); while (true);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "keep") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "DoWhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 229 | |
x = esprima.parse( "do { x++; y--; } while (x < 10)"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].body.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.argument === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.argument.name !== "y") throw ""; | |
if (x.body[0].body.body[1].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.operator !== "--") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.left === undefined) throw ""; | |
if (x.body[0].test.left.name !== "x") throw ""; | |
if (x.body[0].test.left.type !== "Identifier") throw ""; | |
if (x.body[0].test.operator !== "<") throw ""; | |
if (x.body[0].test.right === undefined) throw ""; | |
if (x.body[0].test.right.raw !== "10") throw ""; | |
if (x.body[0].test.right.type !== "Literal") throw ""; | |
if (x.body[0].test.right.value !== 10) throw ""; | |
if (x.body[0].test.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "DoWhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 230 | |
x = esprima.parse( "{ do { } while (false);false }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].body === undefined) throw ""; | |
if (x.body[0].body[0].body.body === undefined) throw ""; | |
if (x.body[0].body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body[0].test === undefined) throw ""; | |
if (x.body[0].body[0].test.raw !== "false") throw ""; | |
if (x.body[0].body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].body[0].type !== "DoWhileStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.raw !== "false") throw ""; | |
if (x.body[0].body[1].expression.type !== "Literal") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 231 | |
x = esprima.parse( "while (true) doSomething()"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "doSomething") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 232 | |
x = esprima.parse( "while (x < 10) { x++; y--; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].body.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.argument === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.argument.name !== "y") throw ""; | |
if (x.body[0].body.body[1].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.operator !== "--") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.left === undefined) throw ""; | |
if (x.body[0].test.left.name !== "x") throw ""; | |
if (x.body[0].test.left.type !== "Identifier") throw ""; | |
if (x.body[0].test.operator !== "<") throw ""; | |
if (x.body[0].test.right === undefined) throw ""; | |
if (x.body[0].test.right.raw !== "10") throw ""; | |
if (x.body[0].test.right.type !== "Literal") throw ""; | |
if (x.body[0].test.right.value !== 10) throw ""; | |
if (x.body[0].test.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 233 | |
x = esprima.parse( "for(;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init !== null) throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 234 | |
x = esprima.parse( "for(;;){}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].init !== null) throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 235 | |
x = esprima.parse( "for(x = 0;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.left === undefined) throw ""; | |
if (x.body[0].init.left.name !== "x") throw ""; | |
if (x.body[0].init.left.type !== "Identifier") throw ""; | |
if (x.body[0].init.operator !== "=") throw ""; | |
if (x.body[0].init.right === undefined) throw ""; | |
if (x.body[0].init.right.raw !== "0") throw ""; | |
if (x.body[0].init.right.type !== "Literal") throw ""; | |
if (x.body[0].init.right.value !== 0) throw ""; | |
if (x.body[0].init.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 236 | |
x = esprima.parse( "for(var x = 0;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations === undefined) throw ""; | |
if (x.body[0].init.declarations[0] === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].init.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].init.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].init.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.kind !== "var") throw ""; | |
if (x.body[0].init.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 237 | |
x = esprima.parse( "for(var x = 0, y = 1;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations === undefined) throw ""; | |
if (x.body[0].init.declarations[0] === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].init.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].init.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].init.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.declarations[1] === undefined) throw ""; | |
if (x.body[0].init.declarations[1].id === undefined) throw ""; | |
if (x.body[0].init.declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].init.declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[1].init === undefined) throw ""; | |
if (x.body[0].init.declarations[1].init.raw !== "1") throw ""; | |
if (x.body[0].init.declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[1].init.value !== 1) throw ""; | |
if (x.body[0].init.declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.kind !== "var") throw ""; | |
if (x.body[0].init.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 238 | |
x = esprima.parse( "for(x = 0; x < 42;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.left === undefined) throw ""; | |
if (x.body[0].init.left.name !== "x") throw ""; | |
if (x.body[0].init.left.type !== "Identifier") throw ""; | |
if (x.body[0].init.operator !== "=") throw ""; | |
if (x.body[0].init.right === undefined) throw ""; | |
if (x.body[0].init.right.raw !== "0") throw ""; | |
if (x.body[0].init.right.type !== "Literal") throw ""; | |
if (x.body[0].init.right.value !== 0) throw ""; | |
if (x.body[0].init.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.left === undefined) throw ""; | |
if (x.body[0].test.left.name !== "x") throw ""; | |
if (x.body[0].test.left.type !== "Identifier") throw ""; | |
if (x.body[0].test.operator !== "<") throw ""; | |
if (x.body[0].test.right === undefined) throw ""; | |
if (x.body[0].test.right.raw !== "42") throw ""; | |
if (x.body[0].test.right.type !== "Literal") throw ""; | |
if (x.body[0].test.right.value !== 42) throw ""; | |
if (x.body[0].test.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 239 | |
x = esprima.parse( "for(x = 0; x < 42; x++);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.left === undefined) throw ""; | |
if (x.body[0].init.left.name !== "x") throw ""; | |
if (x.body[0].init.left.type !== "Identifier") throw ""; | |
if (x.body[0].init.operator !== "=") throw ""; | |
if (x.body[0].init.right === undefined) throw ""; | |
if (x.body[0].init.right.raw !== "0") throw ""; | |
if (x.body[0].init.right.type !== "Literal") throw ""; | |
if (x.body[0].init.right.value !== 0) throw ""; | |
if (x.body[0].init.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.left === undefined) throw ""; | |
if (x.body[0].test.left.name !== "x") throw ""; | |
if (x.body[0].test.left.type !== "Identifier") throw ""; | |
if (x.body[0].test.operator !== "<") throw ""; | |
if (x.body[0].test.right === undefined) throw ""; | |
if (x.body[0].test.right.raw !== "42") throw ""; | |
if (x.body[0].test.right.type !== "Literal") throw ""; | |
if (x.body[0].test.right.value !== 42) throw ""; | |
if (x.body[0].test.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update === undefined) throw ""; | |
if (x.body[0].update.argument === undefined) throw ""; | |
if (x.body[0].update.argument.name !== "x") throw ""; | |
if (x.body[0].update.argument.type !== "Identifier") throw ""; | |
if (x.body[0].update.operator !== "++") throw ""; | |
if (x.body[0].update.type !== "UpdateExpression") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 240 | |
x = esprima.parse( "for(x = 0; x < 42; x++) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.left === undefined) throw ""; | |
if (x.body[0].init.left.name !== "x") throw ""; | |
if (x.body[0].init.left.type !== "Identifier") throw ""; | |
if (x.body[0].init.operator !== "=") throw ""; | |
if (x.body[0].init.right === undefined) throw ""; | |
if (x.body[0].init.right.raw !== "0") throw ""; | |
if (x.body[0].init.right.type !== "Literal") throw ""; | |
if (x.body[0].init.right.value !== 0) throw ""; | |
if (x.body[0].init.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.left === undefined) throw ""; | |
if (x.body[0].test.left.name !== "x") throw ""; | |
if (x.body[0].test.left.type !== "Identifier") throw ""; | |
if (x.body[0].test.operator !== "<") throw ""; | |
if (x.body[0].test.right === undefined) throw ""; | |
if (x.body[0].test.right.raw !== "42") throw ""; | |
if (x.body[0].test.right.type !== "Literal") throw ""; | |
if (x.body[0].test.right.value !== 42) throw ""; | |
if (x.body[0].test.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update === undefined) throw ""; | |
if (x.body[0].update.argument === undefined) throw ""; | |
if (x.body[0].update.argument.name !== "x") throw ""; | |
if (x.body[0].update.argument.type !== "Identifier") throw ""; | |
if (x.body[0].update.operator !== "++") throw ""; | |
if (x.body[0].update.type !== "UpdateExpression") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 241 | |
x = esprima.parse( "for(x in list) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].left === undefined) throw ""; | |
if (x.body[0].left.name !== "x") throw ""; | |
if (x.body[0].left.type !== "Identifier") throw ""; | |
if (x.body[0].right === undefined) throw ""; | |
if (x.body[0].right.name !== "list") throw ""; | |
if (x.body[0].right.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ForInStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 242 | |
x = esprima.parse( "for (var x in list) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].left === undefined) throw ""; | |
if (x.body[0].left.declarations === undefined) throw ""; | |
if (x.body[0].left.declarations[0] === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].left.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].left.declarations[0].init !== null) throw ""; | |
if (x.body[0].left.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].left.kind !== "var") throw ""; | |
if (x.body[0].left.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].right === undefined) throw ""; | |
if (x.body[0].right.name !== "list") throw ""; | |
if (x.body[0].right.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ForInStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 243 | |
x = esprima.parse( "for (var x = 42 in list) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].left === undefined) throw ""; | |
if (x.body[0].left.declarations === undefined) throw ""; | |
if (x.body[0].left.declarations[0] === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].left.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].left.declarations[0].init === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].left.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].left.declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].left.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].left.kind !== "var") throw ""; | |
if (x.body[0].left.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].right === undefined) throw ""; | |
if (x.body[0].right.name !== "list") throw ""; | |
if (x.body[0].right.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ForInStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 244 | |
x = esprima.parse( "for (var i = function() { return 10 in [] } in list) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].left === undefined) throw ""; | |
if (x.body[0].left.declarations === undefined) throw ""; | |
if (x.body[0].left.declarations[0] === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id.name !== "i") throw ""; | |
if (x.body[0].left.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].left.declarations[0].init === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0] === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.left === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.left.raw !== "10") throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.left.type !== "Literal") throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.left.value !== 10) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.operator !== "in") throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.right === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.right.elements === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].argument.type !== "BinaryExpression") throw ""; | |
if (x.body[0].left.declarations[0].init.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].left.declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].left.declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.id !== null) throw ""; | |
if (x.body[0].left.declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].left.declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].left.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].left.kind !== "var") throw ""; | |
if (x.body[0].left.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].right === undefined) throw ""; | |
if (x.body[0].right.name !== "list") throw ""; | |
if (x.body[0].right.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ForInStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 245 | |
x = esprima.parse( "while (true) { continue; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 246 | |
x = esprima.parse( "while (true) { continue }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 247 | |
x = esprima.parse( "done: while (true) { continue done }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.body === undefined) throw ""; | |
if (x.body[0].body.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label.name !== "done") throw ""; | |
if (x.body[0].body.body.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "WhileStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "done") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 248 | |
x = esprima.parse( "done: while (true) { continue done; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.body === undefined) throw ""; | |
if (x.body[0].body.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label.name !== "done") throw ""; | |
if (x.body[0].body.body.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "WhileStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "done") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 249 | |
x = esprima.parse( "while (true) { break }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 250 | |
x = esprima.parse( "done: while (true) { break done }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.body === undefined) throw ""; | |
if (x.body[0].body.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label.name !== "done") throw ""; | |
if (x.body[0].body.body.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "WhileStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "done") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 251 | |
x = esprima.parse( "done: while (true) { break done; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.body === undefined) throw ""; | |
if (x.body[0].body.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label === undefined) throw ""; | |
if (x.body[0].body.body.body[0].label.name !== "done") throw ""; | |
if (x.body[0].body.body.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "WhileStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "done") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 252 | |
x = esprima.parse( "(function(){ return })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument !== null) throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 253 | |
x = esprima.parse( "(function(){ return; })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument !== null) throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 254 | |
x = esprima.parse( "(function(){ return x; })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument.name !== "x") throw ""; | |
if (x.body[0].expression.body.body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 255 | |
x = esprima.parse( "(function(){ return x * y })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument.left === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument.left.name !== "x") throw ""; | |
if (x.body[0].expression.body.body[0].argument.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[0].argument.operator !== "*") throw ""; | |
if (x.body[0].expression.body.body[0].argument.right === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument.right.name !== "y") throw ""; | |
if (x.body[0].expression.body.body[0].argument.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[0].argument.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 256 | |
x = esprima.parse( "with (x) foo = bar"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.left === undefined) throw ""; | |
if (x.body[0].body.expression.left.name !== "foo") throw ""; | |
if (x.body[0].body.expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.operator !== "=") throw ""; | |
if (x.body[0].body.expression.right === undefined) throw ""; | |
if (x.body[0].body.expression.right.name !== "bar") throw ""; | |
if (x.body[0].body.expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].object === undefined) throw ""; | |
if (x.body[0].object.name !== "x") throw ""; | |
if (x.body[0].object.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "WithStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 257 | |
x = esprima.parse( "with (x) foo = bar;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.left === undefined) throw ""; | |
if (x.body[0].body.expression.left.name !== "foo") throw ""; | |
if (x.body[0].body.expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.operator !== "=") throw ""; | |
if (x.body[0].body.expression.right === undefined) throw ""; | |
if (x.body[0].body.expression.right.name !== "bar") throw ""; | |
if (x.body[0].body.expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].object === undefined) throw ""; | |
if (x.body[0].object.name !== "x") throw ""; | |
if (x.body[0].object.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "WithStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 258 | |
x = esprima.parse( "with (x) { foo = bar }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.left.name !== "foo") throw ""; | |
if (x.body[0].body.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.right.name !== "bar") throw ""; | |
if (x.body[0].body.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].object === undefined) throw ""; | |
if (x.body[0].object.name !== "x") throw ""; | |
if (x.body[0].object.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "WithStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 259 | |
x = esprima.parse( "switch (x) {}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].cases === undefined) throw ""; | |
if (x.body[0].discriminant === undefined) throw ""; | |
if (x.body[0].discriminant.name !== "x") throw ""; | |
if (x.body[0].discriminant.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "SwitchStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 260 | |
x = esprima.parse( "switch (answer) { case 42: hi(); break; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].cases === undefined) throw ""; | |
if (x.body[0].cases[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.name !== "hi") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].cases[0].consequent[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].cases[0].consequent[1] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].label !== null) throw ""; | |
if (x.body[0].cases[0].consequent[1].type !== "BreakStatement") throw ""; | |
if (x.body[0].cases[0].test === undefined) throw ""; | |
if (x.body[0].cases[0].test.raw !== "42") throw ""; | |
if (x.body[0].cases[0].test.type !== "Literal") throw ""; | |
if (x.body[0].cases[0].test.value !== 42) throw ""; | |
if (x.body[0].cases[0].type !== "SwitchCase") throw ""; | |
if (x.body[0].discriminant === undefined) throw ""; | |
if (x.body[0].discriminant.name !== "answer") throw ""; | |
if (x.body[0].discriminant.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "SwitchStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 261 | |
x = esprima.parse( "switch (answer) { case 42: hi(); break; default: break }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].cases === undefined) throw ""; | |
if (x.body[0].cases[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.name !== "hi") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].cases[0].consequent[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].cases[0].consequent[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].cases[0].consequent[1] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].label !== null) throw ""; | |
if (x.body[0].cases[0].consequent[1].type !== "BreakStatement") throw ""; | |
if (x.body[0].cases[0].test === undefined) throw ""; | |
if (x.body[0].cases[0].test.raw !== "42") throw ""; | |
if (x.body[0].cases[0].test.type !== "Literal") throw ""; | |
if (x.body[0].cases[0].test.value !== 42) throw ""; | |
if (x.body[0].cases[0].type !== "SwitchCase") throw ""; | |
if (x.body[0].cases[1] === undefined) throw ""; | |
if (x.body[0].cases[1].consequent === undefined) throw ""; | |
if (x.body[0].cases[1].consequent[0] === undefined) throw ""; | |
if (x.body[0].cases[1].consequent[0].label !== null) throw ""; | |
if (x.body[0].cases[1].consequent[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].cases[1].test !== null) throw ""; | |
if (x.body[0].cases[1].type !== "SwitchCase") throw ""; | |
if (x.body[0].discriminant === undefined) throw ""; | |
if (x.body[0].discriminant.name !== "answer") throw ""; | |
if (x.body[0].discriminant.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "SwitchStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 262 | |
x = esprima.parse( "start: for (;;) break start"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.label === undefined) throw ""; | |
if (x.body[0].body.body.label.name !== "start") throw ""; | |
if (x.body[0].body.body.label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.type !== "BreakStatement") throw ""; | |
if (x.body[0].body.init !== null) throw ""; | |
if (x.body[0].body.test !== null) throw ""; | |
if (x.body[0].body.type !== "ForStatement") throw ""; | |
if (x.body[0].body.update !== null) throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "start") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 263 | |
x = esprima.parse( "start: while (true) break start"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body.label === undefined) throw ""; | |
if (x.body[0].body.body.label.name !== "start") throw ""; | |
if (x.body[0].body.body.label.type !== "Identifier") throw ""; | |
if (x.body[0].body.body.type !== "BreakStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "WhileStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "start") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 264 | |
x = esprima.parse( "throw x;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].argument === undefined) throw ""; | |
if (x.body[0].argument.name !== "x") throw ""; | |
if (x.body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ThrowStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 265 | |
x = esprima.parse( "throw x * y"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].argument === undefined) throw ""; | |
if (x.body[0].argument.left === undefined) throw ""; | |
if (x.body[0].argument.left.name !== "x") throw ""; | |
if (x.body[0].argument.left.type !== "Identifier") throw ""; | |
if (x.body[0].argument.operator !== "*") throw ""; | |
if (x.body[0].argument.right === undefined) throw ""; | |
if (x.body[0].argument.right.name !== "y") throw ""; | |
if (x.body[0].argument.right.type !== "Identifier") throw ""; | |
if (x.body[0].argument.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ThrowStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 266 | |
x = esprima.parse( "throw { message: \"Error\" }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].argument === undefined) throw ""; | |
if (x.body[0].argument.properties === undefined) throw ""; | |
if (x.body[0].argument.properties[0] === undefined) throw ""; | |
if (x.body[0].argument.properties[0].key === undefined) throw ""; | |
if (x.body[0].argument.properties[0].key.name !== "message") throw ""; | |
if (x.body[0].argument.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].argument.properties[0].kind !== "init") throw ""; | |
if (x.body[0].argument.properties[0].type !== "Property") throw ""; | |
if (x.body[0].argument.properties[0].value === undefined) throw ""; | |
if (x.body[0].argument.properties[0].value.raw !== "\"Error\"") throw ""; | |
if (x.body[0].argument.properties[0].value.type !== "Literal") throw ""; | |
if (x.body[0].argument.properties[0].value.value !== "Error") throw ""; | |
if (x.body[0].argument.type !== "ObjectExpression") throw ""; | |
if (x.body[0].type !== "ThrowStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 267 | |
x = esprima.parse( "try { } catch (e) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer !== null) throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "e") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "e") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 268 | |
x = esprima.parse( "try { } catch (eval) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer !== null) throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "eval") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "eval") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 269 | |
x = esprima.parse( "try { } catch (arguments) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer !== null) throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "arguments") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "arguments") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 270 | |
x = esprima.parse( "try { } catch (e) { say(e) }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer !== null) throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.body[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handler.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "e") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handlers[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "e") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 271 | |
x = esprima.parse( "try { } finally { cleanup(stuff) }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer === undefined) throw ""; | |
if (x.body[0].finalizer.body === undefined) throw ""; | |
if (x.body[0].finalizer.body[0] === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0].name !== "stuff") throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee.name !== "cleanup") throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].finalizer.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].finalizer.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].finalizer.type !== "BlockStatement") throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler !== null) throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 272 | |
x = esprima.parse( "try { doThat(); } catch (e) { say(e) }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.body[0] === undefined) throw ""; | |
if (x.body[0].block.body[0].expression === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.callee.name !== "doThat") throw ""; | |
if (x.body[0].block.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].block.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].block.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer !== null) throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.body[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handler.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "e") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handlers[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "e") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 273 | |
x = esprima.parse( "try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].block === undefined) throw ""; | |
if (x.body[0].block.body === undefined) throw ""; | |
if (x.body[0].block.body[0] === undefined) throw ""; | |
if (x.body[0].block.body[0].expression === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].block.body[0].expression.callee.name !== "doThat") throw ""; | |
if (x.body[0].block.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].block.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].block.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].block.type !== "BlockStatement") throw ""; | |
if (x.body[0].finalizer === undefined) throw ""; | |
if (x.body[0].finalizer.body === undefined) throw ""; | |
if (x.body[0].finalizer.body[0] === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0].name !== "stuff") throw ""; | |
if (x.body[0].finalizer.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee.name !== "cleanup") throw ""; | |
if (x.body[0].finalizer.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].finalizer.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].finalizer.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].finalizer.type !== "BlockStatement") throw ""; | |
if (x.body[0].guardedHandlers === undefined) throw ""; | |
if (x.body[0].handler === undefined) throw ""; | |
if (x.body[0].handler.body === undefined) throw ""; | |
if (x.body[0].handler.body.body === undefined) throw ""; | |
if (x.body[0].handler.body.body[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handler.body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handler.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handler.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handler.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handler.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handler.param === undefined) throw ""; | |
if (x.body[0].handler.param.name !== "e") throw ""; | |
if (x.body[0].handler.param.type !== "Identifier") throw ""; | |
if (x.body[0].handler.type !== "CatchClause") throw ""; | |
if (x.body[0].handlers === undefined) throw ""; | |
if (x.body[0].handlers[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].name !== "e") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.name !== "say") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].handlers[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].handlers[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].handlers[0].param === undefined) throw ""; | |
if (x.body[0].handlers[0].param.name !== "e") throw ""; | |
if (x.body[0].handlers[0].param.type !== "Identifier") throw ""; | |
if (x.body[0].handlers[0].type !== "CatchClause") throw ""; | |
if (x.body[0].type !== "TryStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 274 | |
x = esprima.parse( "debugger;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].type !== "DebuggerStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 275 | |
x = esprima.parse( "function hello() { sayHi(); }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "hello") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 276 | |
x = esprima.parse( "function eval() { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "eval") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 277 | |
x = esprima.parse( "function arguments() { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "arguments") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 278 | |
x = esprima.parse( "function test(t, t) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "test") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].params[0].name !== "t") throw ""; | |
if (x.body[0].params[0].type !== "Identifier") throw ""; | |
if (x.body[0].params[1] === undefined) throw ""; | |
if (x.body[0].params[1].name !== "t") throw ""; | |
if (x.body[0].params[1].type !== "Identifier") throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 279 | |
x = esprima.parse( "(function test(t, t) { })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id === undefined) throw ""; | |
if (x.body[0].expression.id.name !== "test") throw ""; | |
if (x.body[0].expression.id.type !== "Identifier") throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.params[0] === undefined) throw ""; | |
if (x.body[0].expression.params[0].name !== "t") throw ""; | |
if (x.body[0].expression.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].expression.params[1] === undefined) throw ""; | |
if (x.body[0].expression.params[1].name !== "t") throw ""; | |
if (x.body[0].expression.params[1].type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 280 | |
x = esprima.parse( "function eval() { function inner() { \"use strict\" } }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.raw !== "\"use strict\"") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.value !== "use strict") throw ""; | |
if (x.body[0].body.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.body[0].defaults === undefined) throw ""; | |
if (x.body[0].body.body[0].id === undefined) throw ""; | |
if (x.body[0].body.body[0].id.name !== "inner") throw ""; | |
if (x.body[0].body.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].params === undefined) throw ""; | |
if (x.body[0].body.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "eval") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 281 | |
x = esprima.parse( "function hello(a) { sayHi(); }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "hello") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].params[0].name !== "a") throw ""; | |
if (x.body[0].params[0].type !== "Identifier") throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 282 | |
x = esprima.parse( "function hello(a, b) { sayHi(); }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "hello") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].params[0].name !== "a") throw ""; | |
if (x.body[0].params[0].type !== "Identifier") throw ""; | |
if (x.body[0].params[1] === undefined) throw ""; | |
if (x.body[0].params[1].name !== "b") throw ""; | |
if (x.body[0].params[1].type !== "Identifier") throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 283 | |
x = esprima.parse( "function hello(...rest) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "hello") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].params[0].argument === undefined) throw ""; | |
if (x.body[0].params[0].argument.name !== "rest") throw ""; | |
if (x.body[0].params[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].params[0].type !== "RestElement") throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 284 | |
x = esprima.parse( "function hello(a, ...rest) { }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "hello") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].params[0].name !== "a") throw ""; | |
if (x.body[0].params[0].type !== "Identifier") throw ""; | |
if (x.body[0].params[1] === undefined) throw ""; | |
if (x.body[0].params[1].argument === undefined) throw ""; | |
if (x.body[0].params[1].argument.name !== "rest") throw ""; | |
if (x.body[0].params[1].argument.type !== "Identifier") throw ""; | |
if (x.body[0].params[1].type !== "RestElement") throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 285 | |
x = esprima.parse( "var hi = function() { sayHi() };"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "hi") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id !== null) throw ""; | |
if (x.body[0].declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 286 | |
x = esprima.parse( "var hi = function (...r) { sayHi() };"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "hi") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id !== null) throw ""; | |
if (x.body[0].declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].declarations[0].init.params[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].init.params[0].argument === undefined) throw ""; | |
if (x.body[0].declarations[0].init.params[0].argument.name !== "r") throw ""; | |
if (x.body[0].declarations[0].init.params[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.params[0].type !== "RestElement") throw ""; | |
if (x.body[0].declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 287 | |
x = esprima.parse( "var hi = function eval() { };"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "hi") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id.name !== "eval") throw ""; | |
if (x.body[0].declarations[0].init.id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 288 | |
x = esprima.parse( "var hi = function arguments() { };"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "hi") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id.name !== "arguments") throw ""; | |
if (x.body[0].declarations[0].init.id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 289 | |
x = esprima.parse( "var hello = function hi() { sayHi() };"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "hello") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.name !== "sayHi") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].declarations[0].init.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].declarations[0].init.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].declarations[0].init.defaults === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id === undefined) throw ""; | |
if (x.body[0].declarations[0].init.id.name !== "hi") throw ""; | |
if (x.body[0].declarations[0].init.id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init.params === undefined) throw ""; | |
if (x.body[0].declarations[0].init.type !== "FunctionExpression") throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 290 | |
x = esprima.parse( "(function(){})"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 291 | |
x = esprima.parse( "{ x\n++y }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression === undefined) throw ""; | |
if (x.body[0].body[0].expression.name !== "x") throw ""; | |
if (x.body[0].body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.argument === undefined) throw ""; | |
if (x.body[0].body[1].expression.argument.name !== "y") throw ""; | |
if (x.body[0].body[1].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].expression.operator !== "++") throw ""; | |
if (x.body[0].body[1].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 292 | |
x = esprima.parse( "{ x\n--y }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression === undefined) throw ""; | |
if (x.body[0].body[0].expression.name !== "x") throw ""; | |
if (x.body[0].body[0].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.argument === undefined) throw ""; | |
if (x.body[0].body[1].expression.argument.name !== "y") throw ""; | |
if (x.body[0].body[1].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].expression.operator !== "--") throw ""; | |
if (x.body[0].body[1].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 293 | |
x = esprima.parse( "var x /* comment */;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 294 | |
x = esprima.parse( "{ var x = 14, y = 3\nz; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].declarations === undefined) throw ""; | |
if (x.body[0].body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].body[0].declarations[0].init.raw !== "14") throw ""; | |
if (x.body[0].body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].body[0].declarations[0].init.value !== 14) throw ""; | |
if (x.body[0].body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].body[0].declarations[1].init.raw !== "3") throw ""; | |
if (x.body[0].body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].body[0].declarations[1].init.value !== 3) throw ""; | |
if (x.body[0].body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].body[0].kind !== "var") throw ""; | |
if (x.body[0].body[0].type !== "VariableDeclaration") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.name !== "z") throw ""; | |
if (x.body[0].body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 295 | |
x = esprima.parse( "while (true) { continue\nthere; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 296 | |
x = esprima.parse( "while (true) { continue // Comment\nthere; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 297 | |
x = esprima.parse( "while (true) { continue /* Multiline\nComment */there; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "ContinueStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 298 | |
x = esprima.parse( "while (true) { break\nthere; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 299 | |
x = esprima.parse( "while (true) { break // Comment\nthere; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 300 | |
x = esprima.parse( "while (true) { break /* Multiline\nComment */there; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].label !== null) throw ""; | |
if (x.body[0].body.body[0].type !== "BreakStatement") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.name !== "there") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "true") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 301 | |
x = esprima.parse( "(function(){ return\nx; })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument !== null) throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.body[1] === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression.name !== "x") throw ""; | |
if (x.body[0].expression.body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 302 | |
x = esprima.parse( "(function(){ return // Comment\nx; })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument !== null) throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.body[1] === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression.name !== "x") throw ""; | |
if (x.body[0].expression.body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 303 | |
x = esprima.parse( "(function(){ return/* Multiline\nComment */x; })"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.body === undefined) throw ""; | |
if (x.body[0].expression.body.body === undefined) throw ""; | |
if (x.body[0].expression.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.body.body[0].argument !== null) throw ""; | |
if (x.body[0].expression.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].expression.body.body[1] === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression === undefined) throw ""; | |
if (x.body[0].expression.body.body[1].expression.name !== "x") throw ""; | |
if (x.body[0].expression.body.body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].expression.body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.defaults === undefined) throw ""; | |
if (x.body[0].expression.id !== null) throw ""; | |
if (x.body[0].expression.params === undefined) throw ""; | |
if (x.body[0].expression.type !== "FunctionExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 304 | |
x = esprima.parse( "{ throw error\nerror; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].argument === undefined) throw ""; | |
if (x.body[0].body[0].argument.name !== "error") throw ""; | |
if (x.body[0].body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ThrowStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.name !== "error") throw ""; | |
if (x.body[0].body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 305 | |
x = esprima.parse( "{ throw error// Comment\nerror; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].argument === undefined) throw ""; | |
if (x.body[0].body[0].argument.name !== "error") throw ""; | |
if (x.body[0].body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ThrowStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.name !== "error") throw ""; | |
if (x.body[0].body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 306 | |
x = esprima.parse( "{ throw error/* Multiline\nComment */error; }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].argument === undefined) throw ""; | |
if (x.body[0].body[0].argument.name !== "error") throw ""; | |
if (x.body[0].body[0].argument.type !== "Identifier") throw ""; | |
if (x.body[0].body[0].type !== "ThrowStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.name !== "error") throw ""; | |
if (x.body[0].body[1].expression.type !== "Identifier") throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 307 | |
x = esprima.parse( ""); | |
if (x.body === undefined) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 308 | |
x = esprima.parse( "foo: if (true) break foo;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.alternate !== null) throw ""; | |
if (x.body[0].body.consequent === undefined) throw ""; | |
if (x.body[0].body.consequent.label === undefined) throw ""; | |
if (x.body[0].body.consequent.label.name !== "foo") throw ""; | |
if (x.body[0].body.consequent.label.type !== "Identifier") throw ""; | |
if (x.body[0].body.consequent.type !== "BreakStatement") throw ""; | |
if (x.body[0].body.test === undefined) throw ""; | |
if (x.body[0].body.test.raw !== "true") throw ""; | |
if (x.body[0].body.test.type !== "Literal") throw ""; | |
if (x.body[0].body.type !== "IfStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "foo") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 309 | |
x = esprima.parse( "(function () {\n 'use strict';\n '\u0000';\n}())"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.body === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body[0] === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body[0].expression.raw !== "'use strict'") throw ""; | |
if (x.body[0].expression.callee.body.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.callee.body.body[0].expression.value !== "use strict") throw ""; | |
if (x.body[0].expression.callee.body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.callee.body.body[1] === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body[1].expression === undefined) throw ""; | |
if (x.body[0].expression.callee.body.body[1].expression.raw !== "'\u0000'") throw ""; | |
if (x.body[0].expression.callee.body.body[1].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.callee.body.body[1].expression.value !== "\u0000") throw ""; | |
if (x.body[0].expression.callee.body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].expression.callee.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].expression.callee.defaults === undefined) throw ""; | |
if (x.body[0].expression.callee.id !== null) throw ""; | |
if (x.body[0].expression.callee.params === undefined) throw ""; | |
if (x.body[0].expression.callee.type !== "FunctionExpression") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 310 | |
x = esprima.parse( "123..toString(10)"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.arguments === undefined) throw ""; | |
if (x.body[0].expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].expression.arguments[0].raw !== "10") throw ""; | |
if (x.body[0].expression.arguments[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.arguments[0].value !== 10) throw ""; | |
if (x.body[0].expression.callee === undefined) throw ""; | |
if (x.body[0].expression.callee.object === undefined) throw ""; | |
if (x.body[0].expression.callee.object.raw !== "123.") throw ""; | |
if (x.body[0].expression.callee.object.type !== "Literal") throw ""; | |
if (x.body[0].expression.callee.object.value !== 123) throw ""; | |
if (x.body[0].expression.callee.property === undefined) throw ""; | |
if (x.body[0].expression.callee.property.name !== "toString") throw ""; | |
if (x.body[0].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.type !== "CallExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 311 | |
x = esprima.parse( "123.+2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.raw !== "123.") throw ""; | |
if (x.body[0].expression.left.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.value !== 123) throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "2") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 2) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 312 | |
x = esprima.parse( "'a\\u0026b'"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "'a\\u0026b'") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "a&b") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 313 | |
x = esprima.parse( "foo: 10; foo: 20;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.raw !== "10") throw ""; | |
if (x.body[0].body.expression.type !== "Literal") throw ""; | |
if (x.body[0].body.expression.value !== 10) throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].label === undefined) throw ""; | |
if (x.body[0].label.name !== "foo") throw ""; | |
if (x.body[0].label.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "LabeledStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].body === undefined) throw ""; | |
if (x.body[1].body.expression === undefined) throw ""; | |
if (x.body[1].body.expression.raw !== "20") throw ""; | |
if (x.body[1].body.expression.type !== "Literal") throw ""; | |
if (x.body[1].body.expression.value !== 20) throw ""; | |
if (x.body[1].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[1].label === undefined) throw ""; | |
if (x.body[1].label.name !== "foo") throw ""; | |
if (x.body[1].label.type !== "Identifier") throw ""; | |
if (x.body[1].type !== "LabeledStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 314 | |
x = esprima.parse( "if(1)/ foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].alternate !== null) throw ""; | |
if (x.body[0].consequent === undefined) throw ""; | |
if (x.body[0].consequent.expression === undefined) throw ""; | |
if (x.body[0].consequent.expression.raw !== "/ foo/") throw ""; | |
if (x.body[0].consequent.expression.regex === undefined) throw ""; | |
if (x.body[0].consequent.expression.regex.flags !== "") throw ""; | |
if (x.body[0].consequent.expression.regex.pattern !== " foo") throw ""; | |
if (x.body[0].consequent.expression.type !== "Literal") throw ""; | |
if (x.body[0].consequent.expression.value === undefined) throw ""; | |
if (x.body[0].consequent.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "1") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].test.value !== 1) throw ""; | |
if (x.body[0].type !== "IfStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 315 | |
x = esprima.parse( "var a = 1;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "a") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "1") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 1) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "var") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 316 | |
x = esprima.parse( "a.in / b"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.object === undefined) throw ""; | |
if (x.body[0].expression.left.object.name !== "a") throw ""; | |
if (x.body[0].expression.left.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.property === undefined) throw ""; | |
if (x.body[0].expression.left.property.name !== "in") throw ""; | |
if (x.body[0].expression.left.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.type !== "MemberExpression") throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "b") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 317 | |
x = esprima.parse( "{}\n/foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].expression === undefined) throw ""; | |
if (x.body[1].expression.raw !== "/foo/") throw ""; | |
if (x.body[1].expression.regex === undefined) throw ""; | |
if (x.body[1].expression.regex.flags !== "") throw ""; | |
if (x.body[1].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[1].expression.type !== "Literal") throw ""; | |
if (x.body[1].expression.value === undefined) throw ""; | |
if (x.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 318 | |
x = esprima.parse( "x++\n{}\n/foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.argument === undefined) throw ""; | |
if (x.body[0].expression.argument.name !== "x") throw ""; | |
if (x.body[0].expression.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "++") throw ""; | |
if (x.body[0].expression.type !== "UpdateExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].body === undefined) throw ""; | |
if (x.body[1].type !== "BlockStatement") throw ""; | |
if (x.body[2] === undefined) throw ""; | |
if (x.body[2].expression === undefined) throw ""; | |
if (x.body[2].expression.raw !== "/foo/") throw ""; | |
if (x.body[2].expression.regex === undefined) throw ""; | |
if (x.body[2].expression.regex.flags !== "") throw ""; | |
if (x.body[2].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[2].expression.type !== "Literal") throw ""; | |
if (x.body[2].expression.value === undefined) throw ""; | |
if (x.body[2].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 319 | |
x = esprima.parse( "{{}\n/foo/}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].body === undefined) throw ""; | |
if (x.body[0].body[0].type !== "BlockStatement") throw ""; | |
if (x.body[0].body[1] === undefined) throw ""; | |
if (x.body[0].body[1].expression === undefined) throw ""; | |
if (x.body[0].body[1].expression.raw !== "/foo/") throw ""; | |
if (x.body[0].body[1].expression.regex === undefined) throw ""; | |
if (x.body[0].body[1].expression.regex.flags !== "") throw ""; | |
if (x.body[0].body[1].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[0].body[1].expression.type !== "Literal") throw ""; | |
if (x.body[0].body[1].expression.value === undefined) throw ""; | |
if (x.body[0].body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 320 | |
x = esprima.parse( "while (1) /foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.raw !== "/foo/") throw ""; | |
if (x.body[0].body.expression.regex === undefined) throw ""; | |
if (x.body[0].body.expression.regex.flags !== "") throw ""; | |
if (x.body[0].body.expression.regex.pattern !== "foo") throw ""; | |
if (x.body[0].body.expression.type !== "Literal") throw ""; | |
if (x.body[0].body.expression.value === undefined) throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].test === undefined) throw ""; | |
if (x.body[0].test.raw !== "1") throw ""; | |
if (x.body[0].test.type !== "Literal") throw ""; | |
if (x.body[0].test.value !== 1) throw ""; | |
if (x.body[0].type !== "WhileStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 321 | |
x = esprima.parse( "(1) / 2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.raw !== "1") throw ""; | |
if (x.body[0].expression.left.type !== "Literal") throw ""; | |
if (x.body[0].expression.left.value !== 1) throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "2") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 2) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 322 | |
x = esprima.parse( "({a: [1]}+[]) / 2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.left === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0].key.name !== "a") throw ""; | |
if (x.body[0].expression.left.left.properties[0].key.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.left.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.left.left.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.left.left.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.elements === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.elements[0] === undefined) throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.elements[0].raw !== "1") throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.elements[0].value !== 1) throw ""; | |
if (x.body[0].expression.left.left.properties[0].value.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.left.left.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.right === undefined) throw ""; | |
if (x.body[0].expression.left.right.elements === undefined) throw ""; | |
if (x.body[0].expression.left.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].expression.left.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "2") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 2) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 323 | |
x = esprima.parse( "{[1]}\n/foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression === undefined) throw ""; | |
if (x.body[0].body[0].expression.elements === undefined) throw ""; | |
if (x.body[0].body[0].expression.elements[0] === undefined) throw ""; | |
if (x.body[0].body[0].expression.elements[0].raw !== "1") throw ""; | |
if (x.body[0].body[0].expression.elements[0].type !== "Literal") throw ""; | |
if (x.body[0].body[0].expression.elements[0].value !== 1) throw ""; | |
if (x.body[0].body[0].expression.type !== "ArrayExpression") throw ""; | |
if (x.body[0].body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].expression === undefined) throw ""; | |
if (x.body[1].expression.raw !== "/foo/") throw ""; | |
if (x.body[1].expression.regex === undefined) throw ""; | |
if (x.body[1].expression.regex.flags !== "") throw ""; | |
if (x.body[1].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[1].expression.type !== "Literal") throw ""; | |
if (x.body[1].expression.value === undefined) throw ""; | |
if (x.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 324 | |
x = esprima.parse( "switch(a) { case 1: {}\n/foo/ }"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].cases === undefined) throw ""; | |
if (x.body[0].cases[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].body === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[0].type !== "BlockStatement") throw ""; | |
if (x.body[0].cases[0].consequent[1] === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].expression === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.raw !== "/foo/") throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.regex === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.regex.flags !== "") throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.type !== "Literal") throw ""; | |
if (x.body[0].cases[0].consequent[1].expression.value === undefined) throw ""; | |
if (x.body[0].cases[0].consequent[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].cases[0].test === undefined) throw ""; | |
if (x.body[0].cases[0].test.raw !== "1") throw ""; | |
if (x.body[0].cases[0].test.type !== "Literal") throw ""; | |
if (x.body[0].cases[0].test.value !== 1) throw ""; | |
if (x.body[0].cases[0].type !== "SwitchCase") throw ""; | |
if (x.body[0].discriminant === undefined) throw ""; | |
if (x.body[0].discriminant.name !== "a") throw ""; | |
if (x.body[0].discriminant.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "SwitchStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 325 | |
x = esprima.parse( "({1: {} / 2})"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.properties === undefined) throw ""; | |
if (x.body[0].expression.properties[0] === undefined) throw ""; | |
if (x.body[0].expression.properties[0].key === undefined) throw ""; | |
if (x.body[0].expression.properties[0].key.raw !== "1") throw ""; | |
if (x.body[0].expression.properties[0].key.type !== "Literal") throw ""; | |
if (x.body[0].expression.properties[0].key.value !== 1) throw ""; | |
if (x.body[0].expression.properties[0].kind !== "init") throw ""; | |
if (x.body[0].expression.properties[0].type !== "Property") throw ""; | |
if (x.body[0].expression.properties[0].value === undefined) throw ""; | |
if (x.body[0].expression.properties[0].value.left === undefined) throw ""; | |
if (x.body[0].expression.properties[0].value.left.properties === undefined) throw ""; | |
if (x.body[0].expression.properties[0].value.left.type !== "ObjectExpression") throw ""; | |
if (x.body[0].expression.properties[0].value.operator !== "/") throw ""; | |
if (x.body[0].expression.properties[0].value.right === undefined) throw ""; | |
if (x.body[0].expression.properties[0].value.right.raw !== "2") throw ""; | |
if (x.body[0].expression.properties[0].value.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.properties[0].value.right.value !== 2) throw ""; | |
if (x.body[0].expression.properties[0].value.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "ObjectExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 326 | |
x = esprima.parse( "+x++ / 2"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.argument === undefined) throw ""; | |
if (x.body[0].expression.left.argument.argument === undefined) throw ""; | |
if (x.body[0].expression.left.argument.argument.name !== "x") throw ""; | |
if (x.body[0].expression.left.argument.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.left.argument.operator !== "++") throw ""; | |
if (x.body[0].expression.left.argument.type !== "UpdateExpression") throw ""; | |
if (x.body[0].expression.left.operator !== "+") throw ""; | |
if (x.body[0].expression.left.type !== "UnaryExpression") throw ""; | |
if (x.body[0].expression.operator !== "/") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.raw !== "2") throw ""; | |
if (x.body[0].expression.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.value !== 2) throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 327 | |
x = esprima.parse( "foo.in\n{}\n/foo/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.object === undefined) throw ""; | |
if (x.body[0].expression.object.name !== "foo") throw ""; | |
if (x.body[0].expression.object.type !== "Identifier") throw ""; | |
if (x.body[0].expression.property === undefined) throw ""; | |
if (x.body[0].expression.property.name !== "in") throw ""; | |
if (x.body[0].expression.property.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "MemberExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].body === undefined) throw ""; | |
if (x.body[1].type !== "BlockStatement") throw ""; | |
if (x.body[2] === undefined) throw ""; | |
if (x.body[2].expression === undefined) throw ""; | |
if (x.body[2].expression.raw !== "/foo/") throw ""; | |
if (x.body[2].expression.regex === undefined) throw ""; | |
if (x.body[2].expression.regex.flags !== "") throw ""; | |
if (x.body[2].expression.regex.pattern !== "foo") throw ""; | |
if (x.body[2].expression.type !== "Literal") throw ""; | |
if (x.body[2].expression.value === undefined) throw ""; | |
if (x.body[2].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 328 | |
x = esprima.parse( "{}/=/"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].type !== "BlockStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].expression === undefined) throw ""; | |
if (x.body[1].expression.raw !== "/=/") throw ""; | |
if (x.body[1].expression.regex === undefined) throw ""; | |
if (x.body[1].expression.regex.flags !== "") throw ""; | |
if (x.body[1].expression.regex.pattern !== "=") throw ""; | |
if (x.body[1].expression.type !== "Literal") throw ""; | |
if (x.body[1].expression.value === undefined) throw ""; | |
if (x.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 329 | |
x = esprima.parse( "foo <!--bar\n+baz"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "foo") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "+") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.name !== "baz") throw ""; | |
if (x.body[0].expression.right.type !== "Identifier") throw ""; | |
if (x.body[0].expression.type !== "BinaryExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 330 | |
x = esprima.parse( "x = y-->10;\n --> nothing"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].expression.left.name !== "x") throw ""; | |
if (x.body[0].expression.left.type !== "Identifier") throw ""; | |
if (x.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].expression.right.left === undefined) throw ""; | |
if (x.body[0].expression.right.left.argument === undefined) throw ""; | |
if (x.body[0].expression.right.left.argument.name !== "y") throw ""; | |
if (x.body[0].expression.right.left.argument.type !== "Identifier") throw ""; | |
if (x.body[0].expression.right.left.operator !== "--") throw ""; | |
if (x.body[0].expression.right.left.type !== "UpdateExpression") throw ""; | |
if (x.body[0].expression.right.operator !== ">") throw ""; | |
if (x.body[0].expression.right.right === undefined) throw ""; | |
if (x.body[0].expression.right.right.raw !== "10") throw ""; | |
if (x.body[0].expression.right.right.type !== "Literal") throw ""; | |
if (x.body[0].expression.right.right.value !== 10) throw ""; | |
if (x.body[0].expression.right.type !== "BinaryExpression") throw ""; | |
if (x.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 331 | |
x = esprima.parse( "'use strict';\nobject.static();"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].expression === undefined) throw ""; | |
if (x.body[0].expression.raw !== "'use strict'") throw ""; | |
if (x.body[0].expression.type !== "Literal") throw ""; | |
if (x.body[0].expression.value !== "use strict") throw ""; | |
if (x.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[1] === undefined) throw ""; | |
if (x.body[1].expression === undefined) throw ""; | |
if (x.body[1].expression.arguments === undefined) throw ""; | |
if (x.body[1].expression.callee === undefined) throw ""; | |
if (x.body[1].expression.callee.object === undefined) throw ""; | |
if (x.body[1].expression.callee.object.name !== "object") throw ""; | |
if (x.body[1].expression.callee.object.type !== "Identifier") throw ""; | |
if (x.body[1].expression.callee.property === undefined) throw ""; | |
if (x.body[1].expression.callee.property.name !== "static") throw ""; | |
if (x.body[1].expression.callee.property.type !== "Identifier") throw ""; | |
if (x.body[1].expression.callee.type !== "MemberExpression") throw ""; | |
if (x.body[1].expression.type !== "CallExpression") throw ""; | |
if (x.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 332 | |
x = esprima.parse( "let x, y;"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init !== null) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init !== null) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "let") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 333 | |
x = esprima.parse( "let x = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "let") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 334 | |
x = esprima.parse( "let eval = 42, arguments = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "eval") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "arguments") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 42) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "let") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 335 | |
x = esprima.parse( "let x = 14, y = 3, z = 1977"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "14") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 14) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "3") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 3) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[2] === undefined) throw ""; | |
if (x.body[0].declarations[2].id === undefined) throw ""; | |
if (x.body[0].declarations[2].id.name !== "z") throw ""; | |
if (x.body[0].declarations[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[2].init === undefined) throw ""; | |
if (x.body[0].declarations[2].init.raw !== "1977") throw ""; | |
if (x.body[0].declarations[2].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[2].init.value !== 1977) throw ""; | |
if (x.body[0].declarations[2].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "let") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 336 | |
x = esprima.parse( "for(let x = 0;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations === undefined) throw ""; | |
if (x.body[0].init.declarations[0] === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].init.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].init.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].init.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.kind !== "let") throw ""; | |
if (x.body[0].init.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 337 | |
x = esprima.parse( "for(let x = 0, y = 1;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations === undefined) throw ""; | |
if (x.body[0].init.declarations[0] === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].init.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].init.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].init.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.declarations[1] === undefined) throw ""; | |
if (x.body[0].init.declarations[1].id === undefined) throw ""; | |
if (x.body[0].init.declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].init.declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[1].init === undefined) throw ""; | |
if (x.body[0].init.declarations[1].init.raw !== "1") throw ""; | |
if (x.body[0].init.declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[1].init.value !== 1) throw ""; | |
if (x.body[0].init.declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.kind !== "let") throw ""; | |
if (x.body[0].init.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 338 | |
x = esprima.parse( "for (let x in list) process(x);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.expression === undefined) throw ""; | |
if (x.body[0].body.expression.arguments === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0] === undefined) throw ""; | |
if (x.body[0].body.expression.arguments[0].name !== "x") throw ""; | |
if (x.body[0].body.expression.arguments[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.callee === undefined) throw ""; | |
if (x.body[0].body.expression.callee.name !== "process") throw ""; | |
if (x.body[0].body.expression.callee.type !== "Identifier") throw ""; | |
if (x.body[0].body.expression.type !== "CallExpression") throw ""; | |
if (x.body[0].body.type !== "ExpressionStatement") throw ""; | |
if (x.body[0].left === undefined) throw ""; | |
if (x.body[0].left.declarations === undefined) throw ""; | |
if (x.body[0].left.declarations[0] === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id === undefined) throw ""; | |
if (x.body[0].left.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].left.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].left.declarations[0].init !== null) throw ""; | |
if (x.body[0].left.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].left.kind !== "let") throw ""; | |
if (x.body[0].left.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].right === undefined) throw ""; | |
if (x.body[0].right.name !== "list") throw ""; | |
if (x.body[0].right.type !== "Identifier") throw ""; | |
if (x.body[0].type !== "ForInStatement") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 339 | |
x = esprima.parse( "const x = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "const") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 340 | |
x = esprima.parse( "const eval = 42, arguments = 42"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "eval") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 42) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "arguments") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "42") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 42) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "const") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 341 | |
x = esprima.parse( "const x = 14, y = 3, z = 1977"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].declarations === undefined) throw ""; | |
if (x.body[0].declarations[0] === undefined) throw ""; | |
if (x.body[0].declarations[0].id === undefined) throw ""; | |
if (x.body[0].declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[0].init === undefined) throw ""; | |
if (x.body[0].declarations[0].init.raw !== "14") throw ""; | |
if (x.body[0].declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[0].init.value !== 14) throw ""; | |
if (x.body[0].declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[1] === undefined) throw ""; | |
if (x.body[0].declarations[1].id === undefined) throw ""; | |
if (x.body[0].declarations[1].id.name !== "y") throw ""; | |
if (x.body[0].declarations[1].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[1].init === undefined) throw ""; | |
if (x.body[0].declarations[1].init.raw !== "3") throw ""; | |
if (x.body[0].declarations[1].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[1].init.value !== 3) throw ""; | |
if (x.body[0].declarations[1].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].declarations[2] === undefined) throw ""; | |
if (x.body[0].declarations[2].id === undefined) throw ""; | |
if (x.body[0].declarations[2].id.name !== "z") throw ""; | |
if (x.body[0].declarations[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].declarations[2].init === undefined) throw ""; | |
if (x.body[0].declarations[2].init.raw !== "1977") throw ""; | |
if (x.body[0].declarations[2].init.type !== "Literal") throw ""; | |
if (x.body[0].declarations[2].init.value !== 1977) throw ""; | |
if (x.body[0].declarations[2].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].kind !== "const") throw ""; | |
if (x.body[0].type !== "VariableDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; | |
// 342 | |
x = esprima.parse( "for(const x = 0;;);"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.type !== "EmptyStatement") throw ""; | |
if (x.body[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations === undefined) throw ""; | |
if (x.body[0].init.declarations[0] === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id === undefined) throw ""; | |
if (x.body[0].init.declarations[0].id.name !== "x") throw ""; | |
if (x.body[0].init.declarations[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].init.declarations[0].init === undefined) throw ""; | |
if (x.body[0].init.declarations[0].init.raw !== "0") throw ""; | |
if (x.body[0].init.declarations[0].init.type !== "Literal") throw ""; | |
if (x.body[0].init.declarations[0].init.value !== 0) throw ""; | |
if (x.body[0].init.declarations[0].type !== "VariableDeclarator") throw ""; | |
if (x.body[0].init.kind !== "const") throw ""; | |
if (x.body[0].init.type !== "VariableDeclaration") throw ""; | |
if (x.body[0].test !== null) throw ""; | |
if (x.body[0].type !== "ForStatement") throw ""; | |
if (x.body[0].update !== null) throw ""; | |
if (x.type !== "Program") throw ""; | |
// 343 | |
x = esprima.parse( "function TestComments() {\n // Bear class\n function Bear(x,y,z) {\n this.position = [x||0,y||0,z||0]\n }\n\n Bear.prototype.roar = function(message) {\n return 'RAWWW: ' + message; // Whatever\n };\n\n function Cat() {\n /* 1\n 2\n 3*/\n }\n\n Cat.prototype.roar = function(message) {\n return 'MEOOWW: ' + /*stuff*/ message;\n };\n}"); | |
if (x.body === undefined) throw ""; | |
if (x.body[0] === undefined) throw ""; | |
if (x.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].body === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.object === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.object.type !== "ThisExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.property === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.property.name !== "position") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.property.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.left.type !== "MemberExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.operator !== "=") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].left === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].left.name !== "x") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].left.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].operator !== "||") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].right === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].right.raw !== "0") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].right.type !== "Literal") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].right.value !== 0) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[0].type !== "LogicalExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1] === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].left === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].left.name !== "y") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].left.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].operator !== "||") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].right === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].right.raw !== "0") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].right.type !== "Literal") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].right.value !== 0) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[1].type !== "LogicalExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2] === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].left === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].left.name !== "z") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].left.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].operator !== "||") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].right === undefined) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].right.raw !== "0") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].right.type !== "Literal") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].right.value !== 0) throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.elements[2].type !== "LogicalExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.right.type !== "ArrayExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.body[0].body.body[0].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.body[0].defaults === undefined) throw ""; | |
if (x.body[0].body.body[0].id === undefined) throw ""; | |
if (x.body[0].body.body[0].id.name !== "Bear") throw ""; | |
if (x.body[0].body.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].params === undefined) throw ""; | |
if (x.body[0].body.body[0].params[0] === undefined) throw ""; | |
if (x.body[0].body.body[0].params[0].name !== "x") throw ""; | |
if (x.body[0].body.body[0].params[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].params[1] === undefined) throw ""; | |
if (x.body[0].body.body[0].params[1].name !== "y") throw ""; | |
if (x.body[0].body.body[0].params[1].type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].params[2] === undefined) throw ""; | |
if (x.body[0].body.body[0].params[2].name !== "z") throw ""; | |
if (x.body[0].body.body[0].params[2].type !== "Identifier") throw ""; | |
if (x.body[0].body.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.body[0].body.body[1] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left.object === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left.object.object === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left.object.object.name !== "Bear") throw ""; | |
if (x.body[0].body.body[1].expression.left.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.left.object.property === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left.object.property.name !== "prototype") throw ""; | |
if (x.body[0].body.body[1].expression.left.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.left.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].body.body[1].expression.left.property === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.left.property.name !== "roar") throw ""; | |
if (x.body[0].body.body[1].expression.left.property.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.left.type !== "MemberExpression") throw ""; | |
if (x.body[0].body.body[1].expression.operator !== "=") throw ""; | |
if (x.body[0].body.body[1].expression.right === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.left === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.left.raw !== "'RAWWW: '") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.left.type !== "Literal") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.left.value !== "RAWWW: ") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.operator !== "+") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.right === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.right.name !== "message") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.right.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].argument.type !== "BinaryExpression") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].body.body[1].expression.right.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.body[1].expression.right.defaults === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.id !== null) throw ""; | |
if (x.body[0].body.body[1].expression.right.params === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.params[0] === undefined) throw ""; | |
if (x.body[0].body.body[1].expression.right.params[0].name !== "message") throw ""; | |
if (x.body[0].body.body[1].expression.right.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.body[1].expression.right.type !== "FunctionExpression") throw ""; | |
if (x.body[0].body.body[1].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.body[1].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.body[2] === undefined) throw ""; | |
if (x.body[0].body.body[2].body === undefined) throw ""; | |
if (x.body[0].body.body[2].body.body === undefined) throw ""; | |
if (x.body[0].body.body[2].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.body[2].defaults === undefined) throw ""; | |
if (x.body[0].body.body[2].id === undefined) throw ""; | |
if (x.body[0].body.body[2].id.name !== "Cat") throw ""; | |
if (x.body[0].body.body[2].id.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[2].params === undefined) throw ""; | |
if (x.body[0].body.body[2].type !== "FunctionDeclaration") throw ""; | |
if (x.body[0].body.body[3] === undefined) throw ""; | |
if (x.body[0].body.body[3].expression === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left.object === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left.object.object === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left.object.object.name !== "Cat") throw ""; | |
if (x.body[0].body.body[3].expression.left.object.object.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[3].expression.left.object.property === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left.object.property.name !== "prototype") throw ""; | |
if (x.body[0].body.body[3].expression.left.object.property.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[3].expression.left.object.type !== "MemberExpression") throw ""; | |
if (x.body[0].body.body[3].expression.left.property === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.left.property.name !== "roar") throw ""; | |
if (x.body[0].body.body[3].expression.left.property.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[3].expression.left.type !== "MemberExpression") throw ""; | |
if (x.body[0].body.body[3].expression.operator !== "=") throw ""; | |
if (x.body[0].body.body[3].expression.right === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0] === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.left === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.left.raw !== "'MEOOWW: '") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.left.type !== "Literal") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.left.value !== "MEOOWW: ") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.operator !== "+") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.right === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.right.name !== "message") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.right.type !== "Identifier") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].argument.type !== "BinaryExpression") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.body[0].type !== "ReturnStatement") throw ""; | |
if (x.body[0].body.body[3].expression.right.body.type !== "BlockStatement") throw ""; | |
if (x.body[0].body.body[3].expression.right.defaults === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.id !== null) throw ""; | |
if (x.body[0].body.body[3].expression.right.params === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.params[0] === undefined) throw ""; | |
if (x.body[0].body.body[3].expression.right.params[0].name !== "message") throw ""; | |
if (x.body[0].body.body[3].expression.right.params[0].type !== "Identifier") throw ""; | |
if (x.body[0].body.body[3].expression.right.type !== "FunctionExpression") throw ""; | |
if (x.body[0].body.body[3].expression.type !== "AssignmentExpression") throw ""; | |
if (x.body[0].body.body[3].type !== "ExpressionStatement") throw ""; | |
if (x.body[0].body.type !== "BlockStatement") throw ""; | |
if (x.body[0].defaults === undefined) throw ""; | |
if (x.body[0].id === undefined) throw ""; | |
if (x.body[0].id.name !== "TestComments") throw ""; | |
if (x.body[0].id.type !== "Identifier") throw ""; | |
if (x.body[0].params === undefined) throw ""; | |
if (x.body[0].type !== "FunctionDeclaration") throw ""; | |
if (x.type !== "Program") throw ""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment