diff --git a/mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api-tests.ts b/mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api-tests.ts index f733707067..76dba72a52 100644 --- a/mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api-tests.ts +++ b/mozilla-spidermonkey-parser-api/mozilla-spidermonkey-parser-api-tests.ts @@ -1,6 +1,8 @@ /// -var literal:spiderMonkeyParserAPI.Syntax.Literal = { +import Syntax = spiderMonkeyParserAPI.Syntax; + +var literal:Syntax.Literal = { loc: { source: null, start: { @@ -17,26 +19,26 @@ var literal:spiderMonkeyParserAPI.Syntax.Literal = { }; // generated by http://esprima.org/demo/parse.html?code=%22use%20strict%22%3B%0A%0Afunction%20Test%20()%20%7B%0A%7D%0A%0ATest.prototype.hello%20%3D%20function(word)%20%7B%0A%09word%20%3D%20word%20%7C%7C%20%22TypeScript%22%3B%0A%09return%20word%3B%0A%7D%3B%0A -var program:spiderMonkeyParserAPI.Syntax.Program = { +var program:Syntax.Program = { "type": "Program", "body": [ - { + { "type": "ExpressionStatement", - "expression": { + "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"" } }, - { + { "type": "FunctionDeclaration", - "id": { + "id": { "type": "Identifier", "name": "Test" }, "params": [], "defaults": [], - "body": { + "body": { "type": "BlockStatement", "body": [] }, @@ -44,61 +46,61 @@ var program:spiderMonkeyParserAPI.Syntax.Program = { "generator": false, "expression": false }, - { + { "type": "ExpressionStatement", - "expression": { + "expression": { "type": "AssignmentExpression", "operator": "=", - "left": { + "left": { "type": "MemberExpression", "computed": false, - "object": { + "object": { "type": "MemberExpression", "computed": false, - "object": { + "object": { "type": "Identifier", "name": "Test" }, - "property": { + "property": { "type": "Identifier", "name": "prototype" } }, - "property": { + "property": { "type": "Identifier", "name": "hello" } }, - "right": { + "right": { "type": "FunctionExpression", "id": null, "params": [ - { + { "type": "Identifier", "name": "word" } ], "defaults": [], - "body": { + "body": { "type": "BlockStatement", "body": [ - { + { "type": "ExpressionStatement", - "expression": { + "expression": { "type": "AssignmentExpression", "operator": "=", - "left": { + "left": { "type": "Identifier", "name": "word" }, - "right": { + "right": { "type": "LogicalExpression", "operator": "||", - "left": { + "left": { "type": "Identifier", "name": "word" }, - "right": { + "right": { "type": "Literal", "value": "TypeScript", "raw": "\"TypeScript\"" @@ -106,7 +108,7 @@ var program:spiderMonkeyParserAPI.Syntax.Program = { } } }, - { + { "type": "ReturnStatement", "argument": { "type": "Identifier",