improved parser performance.

This commit is contained in:
wenshao
2017-08-26 22:53:51 +08:00
parent 76c441949f
commit a983b2685b
75 changed files with 2998 additions and 2053 deletions
@@ -20,6 +20,7 @@ import java.util.List;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.*;
import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
@@ -168,7 +169,14 @@ public class SQLColumnDefinition extends SQLObjectImpl implements SQLTableElemen
return comment;
}
public void setComment(String comment) {
this.setComment(new SQLCharExpr(comment));
}
public void setComment(SQLExpr comment) {
if (comment != null) {
comment.setParent(this);
}
this.comment = comment;
}