|
65 | 65 | estraverse = require('estraverse'); |
66 | 66 | esutils = require('esutils'); |
67 | 67 |
|
68 | | - Syntax = { |
69 | | - AssignmentExpression: 'AssignmentExpression', |
70 | | - ArrayExpression: 'ArrayExpression', |
71 | | - ArrayPattern: 'ArrayPattern', |
72 | | - ArrowFunctionExpression: 'ArrowFunctionExpression', |
73 | | - BlockStatement: 'BlockStatement', |
74 | | - BinaryExpression: 'BinaryExpression', |
75 | | - BreakStatement: 'BreakStatement', |
76 | | - CallExpression: 'CallExpression', |
77 | | - CatchClause: 'CatchClause', |
78 | | - ClassBody: 'ClassBody', |
79 | | - ClassDeclaration: 'ClassDeclaration', |
80 | | - ClassExpression: 'ClassExpression', |
81 | | - ComprehensionBlock: 'ComprehensionBlock', |
82 | | - ComprehensionExpression: 'ComprehensionExpression', |
83 | | - ConditionalExpression: 'ConditionalExpression', |
84 | | - ContinueStatement: 'ContinueStatement', |
85 | | - DirectiveStatement: 'DirectiveStatement', |
86 | | - DoWhileStatement: 'DoWhileStatement', |
87 | | - DebuggerStatement: 'DebuggerStatement', |
88 | | - EmptyStatement: 'EmptyStatement', |
89 | | - ExportBatchSpecifier: 'ExportBatchSpecifier', |
90 | | - ExportDeclaration: 'ExportDeclaration', |
91 | | - ExportSpecifier: 'ExportSpecifier', |
92 | | - ExpressionStatement: 'ExpressionStatement', |
93 | | - ForStatement: 'ForStatement', |
94 | | - ForInStatement: 'ForInStatement', |
95 | | - ForOfStatement: 'ForOfStatement', |
96 | | - FunctionDeclaration: 'FunctionDeclaration', |
97 | | - FunctionExpression: 'FunctionExpression', |
98 | | - GeneratorExpression: 'GeneratorExpression', |
99 | | - Identifier: 'Identifier', |
100 | | - IfStatement: 'IfStatement', |
101 | | - ImportDeclaration: 'ImportDeclaration', |
102 | | - ImportDefaultSpecifier: 'ImportDefaultSpecifier', |
103 | | - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', |
104 | | - ImportSpecifier: 'ImportSpecifier', |
105 | | - Literal: 'Literal', |
106 | | - LabeledStatement: 'LabeledStatement', |
107 | | - LogicalExpression: 'LogicalExpression', |
108 | | - MemberExpression: 'MemberExpression', |
109 | | - MethodDefinition: 'MethodDefinition', |
110 | | - ModuleSpecifier: 'ModuleSpecifier', |
111 | | - NewExpression: 'NewExpression', |
112 | | - ObjectExpression: 'ObjectExpression', |
113 | | - ObjectPattern: 'ObjectPattern', |
114 | | - Program: 'Program', |
115 | | - Property: 'Property', |
116 | | - ReturnStatement: 'ReturnStatement', |
117 | | - SequenceExpression: 'SequenceExpression', |
118 | | - SpreadElement: 'SpreadElement', |
119 | | - SwitchStatement: 'SwitchStatement', |
120 | | - SwitchCase: 'SwitchCase', |
121 | | - TaggedTemplateExpression: 'TaggedTemplateExpression', |
122 | | - TemplateElement: 'TemplateElement', |
123 | | - TemplateLiteral: 'TemplateLiteral', |
124 | | - ThisExpression: 'ThisExpression', |
125 | | - ThrowStatement: 'ThrowStatement', |
126 | | - TryStatement: 'TryStatement', |
127 | | - UnaryExpression: 'UnaryExpression', |
128 | | - UpdateExpression: 'UpdateExpression', |
129 | | - VariableDeclaration: 'VariableDeclaration', |
130 | | - VariableDeclarator: 'VariableDeclarator', |
131 | | - WhileStatement: 'WhileStatement', |
132 | | - WithStatement: 'WithStatement', |
133 | | - YieldExpression: 'YieldExpression' |
134 | | - }; |
| 68 | + Syntax = estraverse.Syntax; |
135 | 69 |
|
136 | 70 | // Generation is done by generateExpression. |
137 | 71 | function isExpression(node) { |
|
0 commit comments