@Override
public void exitType(BQLParser.TypeContext ctx) {
String type;
if (ctx.primitive_type() != null) {
type = ctx.primitive_type().getText();
} else if (ctx.boxed_type() != null) {
type = ctx.boxed_type().getText();
} else if (ctx.limited_type() != null) {
type = ctx.limited_type().getText();
} else if (ctx.map_type() != null) {
return;
} else {
throw new UnsupportedOperationException("Not implemented yet.");
}
try {
if (type.equalsIgnoreCase("int")) {
valProperty.put(ctx, LindenType.INTEGER);
} else {
valProperty.put(ctx, LindenType.valueOf(type.toUpperCase()));
}
} catch (Exception e) {
throw new ParseCancellationException(new SemanticException(ctx, "Type " + type + " not support."));
}
}
BQLCompilerAnalyzer.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:linden
作者:
评论列表
文章目录