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);
}
};
exports.TypeOfExpression = function (node, print) {
this.push("typeof ");
print(node.expression);
};

View File

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

View File

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

View File

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