Advertisement
Guest User

Esprima omgomg

a guest
Jan 16th, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     "type": "Program",
  3.     "body": [
  4.         {
  5.             "type": "ExpressionStatement",
  6.             "expression": {
  7.                 "type": "Literal",
  8.                 "value": "use strict"
  9.             }
  10.         },
  11.         {
  12.             "type": "VariableDeclaration",
  13.             "declarations": [
  14.                 {
  15.                     "type": "VariableDeclarator",
  16.                     "id": {
  17.                         "type": "Identifier",
  18.                         "name": "http"
  19.                     },
  20.                     "init": {
  21.                         "type": "CallExpression",
  22.                         "callee": {
  23.                             "type": "Identifier",
  24.                             "name": "require"
  25.                         },
  26.                         "arguments": [
  27.                             {
  28.                                 "type": "Literal",
  29.                                 "value": "http"
  30.                             }
  31.                         ]
  32.                     }
  33.                 },
  34.                 {
  35.                     "type": "VariableDeclarator",
  36.                     "id": {
  37.                         "type": "Identifier",
  38.                         "name": "socketio"
  39.                     },
  40.                     "init": {
  41.                         "type": "CallExpression",
  42.                         "callee": {
  43.                             "type": "Identifier",
  44.                             "name": "require"
  45.                         },
  46.                         "arguments": [
  47.                             {
  48.                                 "type": "Literal",
  49.                                 "value": "socket.io"
  50.                             }
  51.                         ]
  52.                     }
  53.                 },
  54.                 {
  55.                     "type": "VariableDeclarator",
  56.                     "id": {
  57.                         "type": "Identifier",
  58.                         "name": "config"
  59.                     },
  60.                     "init": {
  61.                         "type": "CallExpression",
  62.                         "callee": {
  63.                             "type": "Identifier",
  64.                             "name": "require"
  65.                         },
  66.                         "arguments": [
  67.                             {
  68.                                 "type": "Literal",
  69.                                 "value": "../shared/config.js"
  70.                             }
  71.                         ]
  72.                     }
  73.                 },
  74.                 {
  75.                     "type": "VariableDeclarator",
  76.                     "id": {
  77.                         "type": "Identifier",
  78.                         "name": "EventHandler"
  79.                     },
  80.                     "init": {
  81.                         "type": "CallExpression",
  82.                         "callee": {
  83.                             "type": "Identifier",
  84.                             "name": "require"
  85.                         },
  86.                         "arguments": [
  87.                             {
  88.                                 "type": "Literal",
  89.                                 "value": "./event_handler.js"
  90.                             }
  91.                         ]
  92.                     }
  93.                 },
  94.                 {
  95.                     "type": "VariableDeclarator",
  96.                     "id": {
  97.                         "type": "Identifier",
  98.                         "name": "RoomManager"
  99.                     },
  100.                     "init": {
  101.                         "type": "CallExpression",
  102.                         "callee": {
  103.                             "type": "Identifier",
  104.                             "name": "require"
  105.                         },
  106.                         "arguments": [
  107.                             {
  108.                                 "type": "Literal",
  109.                                 "value": "./room_manager.js"
  110.                             }
  111.                         ]
  112.                     }
  113.                 },
  114.                 {
  115.                     "type": "VariableDeclarator",
  116.                     "id": {
  117.                         "type": "Identifier",
  118.                         "name": "Client"
  119.                     },
  120.                     "init": {
  121.                         "type": "CallExpression",
  122.                         "callee": {
  123.                             "type": "Identifier",
  124.                             "name": "require"
  125.                         },
  126.                         "arguments": [
  127.                             {
  128.                                 "type": "Literal",
  129.                                 "value": "./client.js"
  130.                             }
  131.                         ]
  132.                     }
  133.                 },
  134.                 {
  135.                     "type": "VariableDeclarator",
  136.                     "id": {
  137.                         "type": "Identifier",
  138.                         "name": "Ticker"
  139.                     },
  140.                     "init": {
  141.                         "type": "CallExpression",
  142.                         "callee": {
  143.                             "type": "Identifier",
  144.                             "name": "require"
  145.                         },
  146.                         "arguments": [
  147.                             {
  148.                                 "type": "Literal",
  149.                                 "value": "./ticker.js"
  150.                             }
  151.                         ]
  152.                     }
  153.                 }
  154.             ],
  155.             "kind": "var"
  156.         },
  157.         {
  158.             "type": "FunctionDeclaration",
  159.             "id": {
  160.                 "type": "Identifier",
  161.                 "name": "Server"
  162.             },
  163.             "params": [],
  164.             "defaults": [],
  165.             "body": {
  166.                 "type": "BlockStatement",
  167.                 "body": [
  168.                     {
  169.                         "type": "ExpressionStatement",
  170.                         "expression": {
  171.                             "type": "AssignmentExpression",
  172.                             "operator": "=",
  173.                             "left": {
  174.                                 "type": "MemberExpression",
  175.                                 "computed": false,
  176.                                 "object": {
  177.                                     "type": "ThisExpression"
  178.                                 },
  179.                                 "property": {
  180.                                     "type": "Identifier",
  181.                                     "name": "inc"
  182.                                 }
  183.                             },
  184.                             "right": {
  185.                                 "type": "Literal",
  186.                                 "value": 0
  187.                             }
  188.                         }
  189.                     },
  190.                     {
  191.                         "type": "ExpressionStatement",
  192.                         "expression": {
  193.                             "type": "AssignmentExpression",
  194.                             "operator": "=",
  195.                             "left": {
  196.                                 "type": "MemberExpression",
  197.                                 "computed": false,
  198.                                 "object": {
  199.                                     "type": "ThisExpression"
  200.                                 },
  201.                                 "property": {
  202.                                     "type": "Identifier",
  203.                                     "name": "clients"
  204.                                 }
  205.                             },
  206.                             "right": {
  207.                                 "type": "ObjectExpression",
  208.                                 "properties": []
  209.                             }
  210.                         }
  211.                     },
  212.                     {
  213.                         "type": "ExpressionStatement",
  214.                         "expression": {
  215.                             "type": "AssignmentExpression",
  216.                             "operator": "=",
  217.                             "left": {
  218.                                 "type": "MemberExpression",
  219.                                 "computed": false,
  220.                                 "object": {
  221.                                     "type": "ThisExpression"
  222.                                 },
  223.                                 "property": {
  224.                                     "type": "Identifier",
  225.                                     "name": "ticker"
  226.                                 }
  227.                             },
  228.                             "right": {
  229.                                 "type": "NewExpression",
  230.                                 "callee": {
  231.                                     "type": "Identifier",
  232.                                     "name": "Ticker"
  233.                                 },
  234.                                 "arguments": [
  235.                                     {
  236.                                         "type": "Literal",
  237.                                         "value": 50
  238.                                     }
  239.                                 ]
  240.                             }
  241.                         }
  242.                     },
  243.                     {
  244.                         "type": "ExpressionStatement",
  245.                         "expression": {
  246.                             "type": "CallExpression",
  247.                             "callee": {
  248.                                 "type": "MemberExpression",
  249.                                 "computed": false,
  250.                                 "object": {
  251.                                     "type": "MemberExpression",
  252.                                     "computed": false,
  253.                                     "object": {
  254.                                         "type": "ThisExpression"
  255.                                     },
  256.                                     "property": {
  257.                                         "type": "Identifier",
  258.                                         "name": "ticker"
  259.                                     }
  260.                                 },
  261.                                 "property": {
  262.                                     "type": "Identifier",
  263.                                     "name": "setMaxListeners"
  264.                                 }
  265.                             },
  266.                             "arguments": [
  267.                                 {
  268.                                     "type": "Literal",
  269.                                     "value": 0
  270.                                 }
  271.                             ]
  272.                         }
  273.                     },
  274.                     {
  275.                         "type": "ExpressionStatement",
  276.                         "expression": {
  277.                             "type": "AssignmentExpression",
  278.                             "operator": "=",
  279.                             "left": {
  280.                                 "type": "MemberExpression",
  281.                                 "computed": false,
  282.                                 "object": {
  283.                                     "type": "ThisExpression"
  284.                                 },
  285.                                 "property": {
  286.                                     "type": "Identifier",
  287.                                     "name": "roomManager"
  288.                                 }
  289.                             },
  290.                             "right": {
  291.                                 "type": "NewExpression",
  292.                                 "callee": {
  293.                                     "type": "Identifier",
  294.                                     "name": "RoomManager"
  295.                                 },
  296.                                 "arguments": [
  297.                                     {
  298.                                         "type": "ThisExpression"
  299.                                     }
  300.                                 ]
  301.                             }
  302.                         }
  303.                     },
  304.                     {
  305.                         "type": "ExpressionStatement",
  306.                         "expression": {
  307.                             "type": "CallExpression",
  308.                             "callee": {
  309.                                 "type": "MemberExpression",
  310.                                 "computed": false,
  311.                                 "object": {
  312.                                     "type": "ThisExpression"
  313.                                 },
  314.                                 "property": {
  315.                                     "type": "Identifier",
  316.                                     "name": "listen"
  317.                                 }
  318.                             },
  319.                             "arguments": [
  320.                                 {
  321.                                     "type": "MemberExpression",
  322.                                     "computed": false,
  323.                                     "object": {
  324.                                         "type": "Identifier",
  325.                                         "name": "config"
  326.                                     },
  327.                                     "property": {
  328.                                         "type": "Identifier",
  329.                                         "name": "SERVER_PORT"
  330.                                     }
  331.                                 }
  332.                             ]
  333.                         }
  334.                     }
  335.                 ]
  336.             },
  337.             "rest": null,
  338.             "generator": false,
  339.             "expression": false
  340.         },
  341.         {
  342.             "type": "ExpressionStatement",
  343.             "expression": {
  344.                 "type": "AssignmentExpression",
  345.                 "operator": "=",
  346.                 "left": {
  347.                     "type": "MemberExpression",
  348.                     "computed": false,
  349.                     "object": {
  350.                         "type": "Identifier",
  351.                         "name": "module"
  352.                     },
  353.                     "property": {
  354.                         "type": "Identifier",
  355.                         "name": "exports"
  356.                     }
  357.                 },
  358.                 "right": {
  359.                     "type": "Identifier",
  360.                     "name": "Server"
  361.                 }
  362.             }
  363.         },
  364.         {
  365.             "type": "ExpressionStatement",
  366.             "expression": {
  367.                 "type": "AssignmentExpression",
  368.                 "operator": "=",
  369.                 "left": {
  370.                     "type": "MemberExpression",
  371.                     "computed": false,
  372.                     "object": {
  373.                         "type": "Identifier",
  374.                         "name": "Server"
  375.                     },
  376.                     "property": {
  377.                         "type": "Identifier",
  378.                         "name": "prototype"
  379.                     }
  380.                 },
  381.                 "right": {
  382.                     "type": "ObjectExpression",
  383.                     "properties": [
  384.                         {
  385.                             "type": "Property",
  386.                             "key": {
  387.                                 "type": "Identifier",
  388.                                 "name": "listen"
  389.                             },
  390.                             "value": {
  391.                                 "type": "FunctionExpression",
  392.                                 "id": null,
  393.                                 "params": [
  394.                                     {
  395.                                         "type": "Identifier",
  396.                                         "name": "port"
  397.                                     }
  398.                                 ],
  399.                                 "defaults": [],
  400.                                 "body": {
  401.                                     "type": "BlockStatement",
  402.                                     "body": [
  403.                                         {
  404.                                             "type": "VariableDeclaration",
  405.                                             "declarations": [
  406.                                                 {
  407.                                                     "type": "VariableDeclarator",
  408.                                                     "id": {
  409.                                                         "type": "Identifier",
  410.                                                         "name": "server"
  411.                                                     },
  412.                                                     "init": {
  413.                                                         "type": "CallExpression",
  414.                                                         "callee": {
  415.                                                             "type": "MemberExpression",
  416.                                                             "computed": false,
  417.                                                             "object": {
  418.                                                                 "type": "Identifier",
  419.                                                                 "name": "http"
  420.                                                             },
  421.                                                             "property": {
  422.                                                                 "type": "Identifier",
  423.                                                                 "name": "createServer"
  424.                                                             }
  425.                                                         },
  426.                                                         "arguments": []
  427.                                                     }
  428.                                                 }
  429.                                             ],
  430.                                             "kind": "var"
  431.                                         },
  432.                                         {
  433.                                             "type": "ExpressionStatement",
  434.                                             "expression": {
  435.                                                 "type": "AssignmentExpression",
  436.                                                 "operator": "=",
  437.                                                 "left": {
  438.                                                     "type": "MemberExpression",
  439.                                                     "computed": false,
  440.                                                     "object": {
  441.                                                         "type": "ThisExpression"
  442.                                                     },
  443.                                                     "property": {
  444.                                                         "type": "Identifier",
  445.                                                         "name": "io"
  446.                                                     }
  447.                                                 },
  448.                                                 "right": {
  449.                                                     "type": "CallExpression",
  450.                                                     "callee": {
  451.                                                         "type": "MemberExpression",
  452.                                                         "computed": false,
  453.                                                         "object": {
  454.                                                             "type": "Identifier",
  455.                                                             "name": "socketio"
  456.                                                         },
  457.                                                         "property": {
  458.                                                             "type": "Identifier",
  459.                                                             "name": "listen"
  460.                                                         }
  461.                                                     },
  462.                                                     "arguments": [
  463.                                                         {
  464.                                                             "type": "Identifier",
  465.                                                             "name": "server"
  466.                                                         },
  467.                                                         {
  468.                                                             "type": "ObjectExpression",
  469.                                                             "properties": [
  470.                                                                 {
  471.                                                                     "type": "Property",
  472.                                                                     "key": {
  473.                                                                         "type": "Identifier",
  474.                                                                         "name": "log"
  475.                                                                     },
  476.                                                                     "value": {
  477.                                                                         "type": "Literal",
  478.                                                                         "value": false
  479.                                                                     },
  480.                                                                     "kind": "init"
  481.                                                                 }
  482.                                                             ]
  483.                                                         }
  484.                                                     ]
  485.                                                 }
  486.                                             }
  487.                                         },
  488.                                         {
  489.                                             "type": "ExpressionStatement",
  490.                                             "expression": {
  491.                                                 "type": "CallExpression",
  492.                                                 "callee": {
  493.                                                     "type": "MemberExpression",
  494.                                                     "computed": false,
  495.                                                     "object": {
  496.                                                         "type": "MemberExpression",
  497.                                                         "computed": false,
  498.                                                         "object": {
  499.                                                             "type": "ThisExpression"
  500.                                                         },
  501.                                                         "property": {
  502.                                                             "type": "Identifier",
  503.                                                             "name": "io"
  504.                                                         }
  505.                                                     },
  506.                                                     "property": {
  507.                                                         "type": "Identifier",
  508.                                                         "name": "set"
  509.                                                     }
  510.                                                 },
  511.                                                 "arguments": [
  512.                                                     {
  513.                                                         "type": "Literal",
  514.                                                         "value": "browser client etag"
  515.                                                     },
  516.                                                     {
  517.                                                         "type": "Literal",
  518.                                                         "value": true
  519.                                                     }
  520.                                                 ]
  521.                                             }
  522.                                         },
  523.                                         {
  524.                                             "type": "ExpressionStatement",
  525.                                             "expression": {
  526.                                                 "type": "CallExpression",
  527.                                                 "callee": {
  528.                                                     "type": "MemberExpression",
  529.                                                     "computed": false,
  530.                                                     "object": {
  531.                                                         "type": "MemberExpression",
  532.                                                         "computed": false,
  533.                                                         "object": {
  534.                                                             "type": "ThisExpression"
  535.                                                         },
  536.                                                         "property": {
  537.                                                             "type": "Identifier",
  538.                                                             "name": "io"
  539.                                                         }
  540.                                                     },
  541.                                                     "property": {
  542.                                                         "type": "Identifier",
  543.                                                         "name": "set"
  544.                                                     }
  545.                                                 },
  546.                                                 "arguments": [
  547.                                                     {
  548.                                                         "type": "Literal",
  549.                                                         "value": "browser client gzip"
  550.                                                     },
  551.                                                     {
  552.                                                         "type": "Literal",
  553.                                                         "value": true
  554.                                                     }
  555.                                                 ]
  556.                                             }
  557.                                         },
  558.                                         {
  559.                                             "type": "ExpressionStatement",
  560.                                             "expression": {
  561.                                                 "type": "CallExpression",
  562.                                                 "callee": {
  563.                                                     "type": "MemberExpression",
  564.                                                     "computed": false,
  565.                                                     "object": {
  566.                                                         "type": "MemberExpression",
  567.                                                         "computed": false,
  568.                                                         "object": {
  569.                                                             "type": "ThisExpression"
  570.                                                         },
  571.                                                         "property": {
  572.                                                             "type": "Identifier",
  573.                                                             "name": "io"
  574.                                                         }
  575.                                                     },
  576.                                                     "property": {
  577.                                                         "type": "Identifier",
  578.                                                         "name": "set"
  579.                                                     }
  580.                                                 },
  581.                                                 "arguments": [
  582.                                                     {
  583.                                                         "type": "Literal",
  584.                                                         "value": "browser client minification"
  585.                                                     },
  586.                                                     {
  587.                                                         "type": "Literal",
  588.                                                         "value": true
  589.                                                     }
  590.                                                 ]
  591.                                             }
  592.                                         },
  593.                                         {
  594.                                             "type": "ExpressionStatement",
  595.                                             "expression": {
  596.                                                 "type": "CallExpression",
  597.                                                 "callee": {
  598.                                                     "type": "MemberExpression",
  599.                                                     "computed": false,
  600.                                                     "object": {
  601.                                                         "type": "MemberExpression",
  602.                                                         "computed": false,
  603.                                                         "object": {
  604.                                                             "type": "ThisExpression"
  605.                                                         },
  606.                                                         "property": {
  607.                                                             "type": "Identifier",
  608.                                                             "name": "io"
  609.                                                         }
  610.                                                     },
  611.                                                     "property": {
  612.                                                         "type": "Identifier",
  613.                                                         "name": "set"
  614.                                                     }
  615.                                                 },
  616.                                                 "arguments": [
  617.                                                     {
  618.                                                         "type": "Literal",
  619.                                                         "value": "transports"
  620.                                                     },
  621.                                                     {
  622.                                                         "type": "ArrayExpression",
  623.                                                         "elements": [
  624.                                                             {
  625.                                                                 "type": "Literal",
  626.                                                                 "value": "websocket"
  627.                                                             }
  628.                                                         ]
  629.                                                     }
  630.                                                 ]
  631.                                             }
  632.                                         },
  633.                                         {
  634.                                             "type": "ExpressionStatement",
  635.                                             "expression": {
  636.                                                 "type": "CallExpression",
  637.                                                 "callee": {
  638.                                                     "type": "MemberExpression",
  639.                                                     "computed": false,
  640.                                                     "object": {
  641.                                                         "type": "MemberExpression",
  642.                                                         "computed": false,
  643.                                                         "object": {
  644.                                                             "type": "ThisExpression"
  645.                                                         },
  646.                                                         "property": {
  647.                                                             "type": "Identifier",
  648.                                                             "name": "io"
  649.                                                         }
  650.                                                     },
  651.                                                     "property": {
  652.                                                         "type": "Identifier",
  653.                                                         "name": "set"
  654.                                                     }
  655.                                                 },
  656.                                                 "arguments": [
  657.                                                     {
  658.                                                         "type": "Literal",
  659.                                                         "value": "close timeout"
  660.                                                     },
  661.                                                     {
  662.                                                         "type": "Literal",
  663.                                                         "value": 10
  664.                                                     }
  665.                                                 ]
  666.                                             }
  667.                                         },
  668.                                         {
  669.                                             "type": "ExpressionStatement",
  670.                                             "expression": {
  671.                                                 "type": "CallExpression",
  672.                                                 "callee": {
  673.                                                     "type": "MemberExpression",
  674.                                                     "computed": false,
  675.                                                     "object": {
  676.                                                         "type": "MemberExpression",
  677.                                                         "computed": false,
  678.                                                         "object": {
  679.                                                             "type": "ThisExpression"
  680.                                                         },
  681.                                                         "property": {
  682.                                                             "type": "Identifier",
  683.                                                             "name": "io"
  684.                                                         }
  685.                                                     },
  686.                                                     "property": {
  687.                                                         "type": "Identifier",
  688.                                                         "name": "set"
  689.                                                     }
  690.                                                 },
  691.                                                 "arguments": [
  692.                                                     {
  693.                                                         "type": "Literal",
  694.                                                         "value": "heartbeat timeout "
  695.                                                     },
  696.                                                     {
  697.                                                         "type": "Literal",
  698.                                                         "value": 10
  699.                                                     }
  700.                                                 ]
  701.                                             }
  702.                                         },
  703.                                         {
  704.                                             "type": "ExpressionStatement",
  705.                                             "expression": {
  706.                                                 "type": "CallExpression",
  707.                                                 "callee": {
  708.                                                     "type": "MemberExpression",
  709.                                                     "computed": false,
  710.                                                     "object": {
  711.                                                         "type": "MemberExpression",
  712.                                                         "computed": false,
  713.                                                         "object": {
  714.                                                             "type": "MemberExpression",
  715.                                                             "computed": false,
  716.                                                             "object": {
  717.                                                                 "type": "ThisExpression"
  718.                                                             },
  719.                                                             "property": {
  720.                                                                 "type": "Identifier",
  721.                                                                 "name": "io"
  722.                                                             }
  723.                                                         },
  724.                                                         "property": {
  725.                                                             "type": "Identifier",
  726.                                                             "name": "sockets"
  727.                                                         }
  728.                                                     },
  729.                                                     "property": {
  730.                                                         "type": "Identifier",
  731.                                                         "name": "on"
  732.                                                     }
  733.                                                 },
  734.                                                 "arguments": [
  735.                                                     {
  736.                                                         "type": "Literal",
  737.                                                         "value": "connection"
  738.                                                     },
  739.                                                     {
  740.                                                         "type": "CallExpression",
  741.                                                         "callee": {
  742.                                                             "type": "MemberExpression",
  743.                                                             "computed": false,
  744.                                                             "object": {
  745.                                                                 "type": "MemberExpression",
  746.                                                                 "computed": false,
  747.                                                                 "object": {
  748.                                                                     "type": "ThisExpression"
  749.                                                                 },
  750.                                                                 "property": {
  751.                                                                     "type": "Identifier",
  752.                                                                     "name": "addClient"
  753.                                                                 }
  754.                                                             },
  755.                                                             "property": {
  756.                                                                 "type": "Identifier",
  757.                                                                 "name": "bind"
  758.                                                             }
  759.                                                         },
  760.                                                         "arguments": [
  761.                                                             {
  762.                                                                 "type": "ThisExpression"
  763.                                                             }
  764.                                                         ]
  765.                                                     }
  766.                                                 ]
  767.                                             }
  768.                                         },
  769.                                         {
  770.                                             "type": "ExpressionStatement",
  771.                                             "expression": {
  772.                                                 "type": "CallExpression",
  773.                                                 "callee": {
  774.                                                     "type": "MemberExpression",
  775.                                                     "computed": false,
  776.                                                     "object": {
  777.                                                         "type": "Identifier",
  778.                                                         "name": "server"
  779.                                                     },
  780.                                                     "property": {
  781.                                                         "type": "Identifier",
  782.                                                         "name": "listen"
  783.                                                     }
  784.                                                 },
  785.                                                 "arguments": [
  786.                                                     {
  787.                                                         "type": "Identifier",
  788.                                                         "name": "port"
  789.                                                     }
  790.                                                 ]
  791.                                             }
  792.                                         }
  793.                                     ]
  794.                                 },
  795.                                 "rest": null,
  796.                                 "generator": false,
  797.                                 "expression": false
  798.                             },
  799.                             "kind": "init"
  800.                         },
  801.                         {
  802.                             "type": "Property",
  803.                             "key": {
  804.                                 "type": "Identifier",
  805.                                 "name": "addClient"
  806.                             },
  807.                             "value": {
  808.                                 "type": "FunctionExpression",
  809.                                 "id": null,
  810.                                 "params": [
  811.                                     {
  812.                                         "type": "Identifier",
  813.                                         "name": "socket"
  814.                                     }
  815.                                 ],
  816.                                 "defaults": [],
  817.                                 "body": {
  818.                                     "type": "BlockStatement",
  819.                                     "body": [
  820.                                         {
  821.                                             "type": "VariableDeclaration",
  822.                                             "declarations": [
  823.                                                 {
  824.                                                     "type": "VariableDeclarator",
  825.                                                     "id": {
  826.                                                         "type": "Identifier",
  827.                                                         "name": "client"
  828.                                                     },
  829.                                                     "init": null
  830.                                                 },
  831.                                                 {
  832.                                                     "type": "VariableDeclarator",
  833.                                                     "id": {
  834.                                                         "type": "Identifier",
  835.                                                         "name": "id"
  836.                                                     },
  837.                                                     "init": {
  838.                                                         "type": "UpdateExpression",
  839.                                                         "operator": "++",
  840.                                                         "argument": {
  841.                                                             "type": "MemberExpression",
  842.                                                             "computed": false,
  843.                                                             "object": {
  844.                                                                 "type": "ThisExpression"
  845.                                                             },
  846.                                                             "property": {
  847.                                                                 "type": "Identifier",
  848.                                                                 "name": "inc"
  849.                                                             }
  850.                                                         },
  851.                                                         "prefix": true
  852.                                                     }
  853.                                                 }
  854.                                             ],
  855.                                             "kind": "var"
  856.                                         },
  857.                                         {
  858.                                             "type": "ExpressionStatement",
  859.                                             "expression": {
  860.                                                 "type": "AssignmentExpression",
  861.                                                 "operator": "=",
  862.                                                 "left": {
  863.                                                     "type": "Identifier",
  864.                                                     "name": "client"
  865.                                                 },
  866.                                                 "right": {
  867.                                                     "type": "NewExpression",
  868.                                                     "callee": {
  869.                                                         "type": "Identifier",
  870.                                                         "name": "Client"
  871.                                                     },
  872.                                                     "arguments": [
  873.                                                         {
  874.                                                             "type": "Identifier",
  875.                                                             "name": "id"
  876.                                                         },
  877.                                                         {
  878.                                                             "type": "ThisExpression"
  879.                                                         },
  880.                                                         {
  881.                                                             "type": "Identifier",
  882.                                                             "name": "socket"
  883.                                                         }
  884.                                                     ]
  885.                                                 }
  886.                                             }
  887.                                         },
  888.                                         {
  889.                                             "type": "ExpressionStatement",
  890.                                             "expression": {
  891.                                                 "type": "AssignmentExpression",
  892.                                                 "operator": "=",
  893.                                                 "left": {
  894.                                                     "type": "MemberExpression",
  895.                                                     "computed": false,
  896.                                                     "object": {
  897.                                                         "type": "Identifier",
  898.                                                         "name": "client"
  899.                                                     },
  900.                                                     "property": {
  901.                                                         "type": "Identifier",
  902.                                                         "name": "eventHandler"
  903.                                                     }
  904.                                                 },
  905.                                                 "right": {
  906.                                                     "type": "NewExpression",
  907.                                                     "callee": {
  908.                                                         "type": "Identifier",
  909.                                                         "name": "EventHandler"
  910.                                                     },
  911.                                                     "arguments": [
  912.                                                         {
  913.                                                             "type": "ThisExpression"
  914.                                                         },
  915.                                                         {
  916.                                                             "type": "Identifier",
  917.                                                             "name": "client"
  918.                                                         },
  919.                                                         {
  920.                                                             "type": "Identifier",
  921.                                                             "name": "socket"
  922.                                                         }
  923.                                                     ]
  924.                                                 }
  925.                                             }
  926.                                         },
  927.                                         {
  928.                                             "type": "ExpressionStatement",
  929.                                             "expression": {
  930.                                                 "type": "AssignmentExpression",
  931.                                                 "operator": "=",
  932.                                                 "left": {
  933.                                                     "type": "MemberExpression",
  934.                                                     "computed": true,
  935.                                                     "object": {
  936.                                                         "type": "MemberExpression",
  937.                                                         "computed": false,
  938.                                                         "object": {
  939.                                                             "type": "ThisExpression"
  940.                                                         },
  941.                                                         "property": {
  942.                                                             "type": "Identifier",
  943.                                                             "name": "clients"
  944.                                                         }
  945.                                                     },
  946.                                                     "property": {
  947.                                                         "type": "Identifier",
  948.                                                         "name": "id"
  949.                                                     }
  950.                                                 },
  951.                                                 "right": {
  952.                                                     "type": "Identifier",
  953.                                                     "name": "client"
  954.                                                 }
  955.                                             }
  956.                                         }
  957.                                     ]
  958.                                 },
  959.                                 "rest": null,
  960.                                 "generator": false,
  961.                                 "expression": false
  962.                             },
  963.                             "kind": "init"
  964.                         },
  965.                         {
  966.                             "type": "Property",
  967.                             "key": {
  968.                                 "type": "Identifier",
  969.                                 "name": "removeClient"
  970.                             },
  971.                             "value": {
  972.                                 "type": "FunctionExpression",
  973.                                 "id": null,
  974.                                 "params": [
  975.                                     {
  976.                                         "type": "Identifier",
  977.                                         "name": "client"
  978.                                     }
  979.                                 ],
  980.                                 "defaults": [],
  981.                                 "body": {
  982.                                     "type": "BlockStatement",
  983.                                     "body": [
  984.                                         {
  985.                                             "type": "ExpressionStatement",
  986.                                             "expression": {
  987.                                                 "type": "CallExpression",
  988.                                                 "callee": {
  989.                                                     "type": "MemberExpression",
  990.                                                     "computed": false,
  991.                                                     "object": {
  992.                                                         "type": "Identifier",
  993.                                                         "name": "client"
  994.                                                     },
  995.                                                     "property": {
  996.                                                         "type": "Identifier",
  997.                                                         "name": "destruct"
  998.                                                     }
  999.                                                 },
  1000.                                                 "arguments": []
  1001.                                             }
  1002.                                         },
  1003.                                         {
  1004.                                             "type": "ExpressionStatement",
  1005.                                             "expression": {
  1006.                                                 "type": "UnaryExpression",
  1007.                                                 "operator": "delete",
  1008.                                                 "argument": {
  1009.                                                     "type": "MemberExpression",
  1010.                                                     "computed": true,
  1011.                                                     "object": {
  1012.                                                         "type": "MemberExpression",
  1013.                                                         "computed": false,
  1014.                                                         "object": {
  1015.                                                             "type": "ThisExpression"
  1016.                                                         },
  1017.                                                         "property": {
  1018.                                                             "type": "Identifier",
  1019.                                                             "name": "clients"
  1020.                                                         }
  1021.                                                     },
  1022.                                                     "property": {
  1023.                                                         "type": "MemberExpression",
  1024.                                                         "computed": false,
  1025.                                                         "object": {
  1026.                                                             "type": "Identifier",
  1027.                                                             "name": "client"
  1028.                                                         },
  1029.                                                         "property": {
  1030.                                                             "type": "Identifier",
  1031.                                                             "name": "id"
  1032.                                                         }
  1033.                                                     }
  1034.                                                 }
  1035.                                             }
  1036.                                         }
  1037.                                     ]
  1038.                                 },
  1039.                                 "rest": null,
  1040.                                 "generator": false,
  1041.                                 "expression": false
  1042.                             },
  1043.                             "kind": "init"
  1044.                         }
  1045.                     ]
  1046.                 }
  1047.             }
  1048.         }
  1049.     ]
  1050. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement