visitCall()

in lib/generator.js [1805:1817]


  visitCall(ast, level) {
    // TODO 这块目前都进了method_call 下面两个分支不知道有没有用
    assert.equal(ast.type, 'call');
    if (ast.left.type === 'method_call') {
      this.visitMethodCall(ast, level);
    } else if (ast.left.type === 'instance_call') {
      this.visitInstanceCall(ast, level);
    } else if (ast.left.type === 'static_call') {
      this.visitStaticCall(ast, level);
    } else {
      throw new Error('un-implemented');
    }
  }