123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- var _ = require('lodash');
- var tree = require('../lib/tree');
- var treeStructure = require('../structure').scopes;
- /*
- */
- module.exports = function(scope) {
-
- scope.fnAST = [];
-
-
-
-
-
-
- };
- var handlers = {
- Program: returnArg,
- EmptyStatement: returnArg,
- BlockStatement: returnArg,
- ExpressionStatement: returnArg,
- IfStatement: returnArg,
- LabeledStatement: returnArg,
- BreakStatement: returnArg,
- ContinueStatement: returnArg,
- WithStatement: returnArg,
- SwitchStatement: returnArg,
- ReturnStatement: returnArg,
- ThrowStatement: returnArg,
- TryStatement: returnArg,
- WhileStatement: returnArg,
- DoWhileStatement: returnArg,
- ForStatement: returnArg,
- ForInStatement: returnArg,
- DebugggerStatement: returnArg,
- FunctionDeclaration: returnArg,
- VariableDeclaration: returnArg,
- VariableDeclarator: returnArg,
- ArgExpression: returnArg,
- ArrayExpression: returnArg,
- ObjectExpression: returnArg,
- FunctionExpression: returnArg,
- SequenceExpression: returnArg,
- UnaryExpression: returnArg,
- BinaryExpression: returnArg,
- AssignmentExpression: returnArg,
- UpdateExpression: returnArg,
- LogicalExpression: returnArg,
- ConditionalExpression: returnArg,
- NewExpression: returnArg,
- CallExpression: returnArg,
- MemberExpression: returnArg,
- SwitchCase: returnArg,
- CatchClause: returnArg,
- Identifier: returnArg,
- Literal: returnArg,
- };
- function returnArg(x) { return x; };
- function c(name, args) {
- return {
- type: 'fnCall',
- name: name,
- args: args,
- };
- }
- function t(body) {
- return {
- type: 'thunk',
- body: body,
- }
- }
|