Add types.TypeOfExpression

This commit is contained in:
Lars Kappert 2015-01-05 14:51:50 +01:00
parent 17ce21509d
commit 520dd7e947
4 changed files with 8 additions and 0 deletions

View File

@ -116,3 +116,8 @@ exports.MemberExpression = function (node, print) {
print(node.property); print(node.property);
} }
}; };
exports.TypeOfExpression = function (node, print) {
this.push("typeof ");
print(node.expression);
};

View File

@ -1,5 +1,6 @@
{ {
"ExpressionStatement": ["Statement"], "ExpressionStatement": ["Statement"],
"TypeOfExpression": ["Statement"],
"BreakStatement": ["Statement"], "BreakStatement": ["Statement"],
"ContinueStatement": ["Statement"], "ContinueStatement": ["Statement"],
"DebuggerStatement": ["Statement"], "DebuggerStatement": ["Statement"],

View File

@ -7,6 +7,7 @@
"CallExpression": ["callee", "arguments"], "CallExpression": ["callee", "arguments"],
"ConditionalExpression": ["test", "consequent", "alternate"], "ConditionalExpression": ["test", "consequent", "alternate"],
"ExpressionStatement": ["expression"], "ExpressionStatement": ["expression"],
"TypeOfExpression": ["expression"],
"File": ["program", "comments", "tokens"], "File": ["program", "comments", "tokens"],
"FunctionExpression": ["id", "params", "body", "generator"], "FunctionExpression": ["id", "params", "body", "generator"],
"Identifier": ["name"], "Identifier": ["name"],

View File

@ -26,6 +26,7 @@
"ExportDeclaration": ["declaration", "specifiers", "source"], "ExportDeclaration": ["declaration", "specifiers", "source"],
"ExportSpecifier": ["id", "name"], "ExportSpecifier": ["id", "name"],
"ExpressionStatement": ["expression"], "ExpressionStatement": ["expression"],
"TypeOfExpression": ["expression"],
"File": ["program"], "File": ["program"],
"ForInStatement": ["left", "right", "body"], "ForInStatement": ["left", "right", "body"],
"ForOfStatement": ["left", "right", "body"], "ForOfStatement": ["left", "right", "body"],