case Token.ARRAYLIT:
return new ArrayLiteral(node, root, scope);
case Token.OBJECTLIT:
return new ObjectLiteral(node, root, scope);
case Token.GETPROP:
case Token.GETELEM:
return new MemberExpression(node, root, scope);
case Token.CALL:
case Token.NEW: {
Node firstChild = node.getFirstChild();
if (firstChild.getType() == Token.NAME) {
String target = firstChild.getString();
Node next = firstChild.getNext();
if (target.equals("Object")) {
// Object类不需要使用new
node.setType(Token.CALL);
if (next == null) {
return new ObjectLiteral(node.getLineno());
}
} else if (target.equals("Array")) {
// Array类可以使用[]代替
node.setType(Token.CALL);
if (next == null