Advertisement
Guest User

Esprima

a guest
Jan 16th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     "type": "Program",
  3.     "body": [
  4.         {
  5.             "type": "FunctionDeclaration",
  6.             "id": {
  7.                 "type": "Identifier",
  8.                 "name": "MyClass"
  9.             },
  10.             "params": [],
  11.             "defaults": [],
  12.             "body": {
  13.                 "type": "BlockStatement",
  14.                 "body": []
  15.             },
  16.             "rest": null,
  17.             "generator": false,
  18.             "expression": false
  19.         },
  20.         {
  21.             "type": "ExpressionStatement",
  22.             "expression": {
  23.                 "type": "AssignmentExpression",
  24.                 "operator": "=",
  25.                 "left": {
  26.                     "type": "MemberExpression",
  27.                     "computed": false,
  28.                     "object": {
  29.                         "type": "Identifier",
  30.                         "name": "module"
  31.                     },
  32.                     "property": {
  33.                         "type": "Identifier",
  34.                         "name": "exports"
  35.                     }
  36.                 },
  37.                 "right": {
  38.                     "type": "Identifier",
  39.                     "name": "MyClass"
  40.                 }
  41.             }
  42.         },
  43.         {
  44.             "type": "ExpressionStatement",
  45.             "expression": {
  46.                 "type": "AssignmentExpression",
  47.                 "operator": "=",
  48.                 "left": {
  49.                     "type": "MemberExpression",
  50.                     "computed": false,
  51.                     "object": {
  52.                         "type": "Identifier",
  53.                         "name": "MyClass"
  54.                     },
  55.                     "property": {
  56.                         "type": "Identifier",
  57.                         "name": "prototype"
  58.                     }
  59.                 },
  60.                 "right": {
  61.                     "type": "ObjectExpression",
  62.                     "properties": [
  63.                         {
  64.                             "type": "Property",
  65.                             "key": {
  66.                                 "type": "Identifier",
  67.                                 "name": "foo"
  68.                             },
  69.                             "value": {
  70.                                 "type": "FunctionExpression",
  71.                                 "id": null,
  72.                                 "params": [
  73.                                     {
  74.                                         "type": "Identifier",
  75.                                         "name": "bar"
  76.                                     }
  77.                                 ],
  78.                                 "defaults": [],
  79.                                 "body": {
  80.                                     "type": "BlockStatement",
  81.                                     "body": [
  82.                                         {
  83.                                             "type": "ReturnStatement",
  84.                                             "argument": {
  85.                                                 "type": "Identifier",
  86.                                                 "name": "bar"
  87.                                             }
  88.                                         }
  89.                                     ]
  90.                                 },
  91.                                 "rest": null,
  92.                                 "generator": false,
  93.                                 "expression": false
  94.                             },
  95.                             "kind": "init"
  96.                         },
  97.                         {
  98.                             "type": "Property",
  99.                             "key": {
  100.                                 "type": "Identifier",
  101.                                 "name": "bar"
  102.                             },
  103.                             "value": {
  104.                                 "type": "FunctionExpression",
  105.                                 "id": null,
  106.                                 "params": [],
  107.                                 "defaults": [],
  108.                                 "body": {
  109.                                     "type": "BlockStatement",
  110.                                     "body": [
  111.                                         {
  112.                                             "type": "ExpressionStatement",
  113.                                             "expression": {
  114.                                                 "type": "CallExpression",
  115.                                                 "callee": {
  116.                                                     "type": "MemberExpression",
  117.                                                     "computed": false,
  118.                                                     "object": {
  119.                                                         "type": "ThisExpression"
  120.                                                     },
  121.                                                     "property": {
  122.                                                         "type": "Identifier",
  123.                                                         "name": "foo"
  124.                                                     }
  125.                                                 },
  126.                                                 "arguments": []
  127.                                             }
  128.                                         }
  129.                                     ]
  130.                                 },
  131.                                 "rest": null,
  132.                                 "generator": false,
  133.                                 "expression": false
  134.                             },
  135.                             "kind": "init"
  136.                         }
  137.                     ]
  138.                 }
  139.             }
  140.         }
  141.     ]
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement