forked from opengaussexamples/examples
add ast class of view
This commit is contained in:
parent
8724f488c2
commit
c10d92fae6
|
|
@ -0,0 +1,24 @@
|
|||
package Parser.AST.View;
|
||||
|
||||
import Lexer.Token;
|
||||
import Parser.AST.ASTNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ViewEndNode extends ASTNode {
|
||||
public ViewEndNode(ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public ViewEndNode(List<Token> tokens) {
|
||||
super(tokens);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ASTNode node, StringBuilder queryString) {
|
||||
queryString.append(toString());
|
||||
for (ASTNode child : getChildren()) {
|
||||
child.visit(child, queryString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package Parser.AST.View;
|
||||
|
||||
import Lexer.Token;
|
||||
import Parser.AST.ASTNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ViewNameNode extends ASTNode {
|
||||
public ViewNameNode(ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public ViewNameNode(List<Token> tokens) {
|
||||
super(tokens);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ASTNode node, StringBuilder queryString) {
|
||||
queryString.append(toString() + " ");
|
||||
for (ASTNode child : getChildren()) {
|
||||
child.visit(child, queryString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package Parser.AST.View;
|
||||
|
||||
import Lexer.Token;
|
||||
import Parser.AST.ASTNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ViewNode extends ASTNode {
|
||||
public ViewNode(ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public ViewNode(List<Token> tokens) {
|
||||
super(tokens);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ASTNode node, StringBuilder queryString) {
|
||||
queryString.append(toString() + " ");
|
||||
for (ASTNode child : getChildren()) {
|
||||
child.visit(child, queryString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package Parser.AST.View;
|
||||
|
||||
import Lexer.Token;
|
||||
import Parser.AST.ASTNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ViewTargetNode extends ASTNode {
|
||||
public ViewTargetNode(ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public ViewTargetNode(List<Token> tokens) {
|
||||
super(tokens);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(ASTNode node, StringBuilder queryString) {
|
||||
queryString.append(toString() + " ");
|
||||
for (ASTNode child : getChildren()) {
|
||||
child.visit(child, queryString);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue