本文整理汇总了Java中org.spoofax.interpreter.core.Tools.isAs方法的典型用法代码示例。如果您正苦于以下问题:Java Tools.isAs方法的具体用法?Java Tools.isAs怎么用?Java Tools.isAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.spoofax.interpreter.core.Tools
的用法示例。
在下文中一共展示了Tools.isAs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: matchAppl
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
public Results matchAppl(IContext env, IStrategoAppl t,
IStrategoAppl p) throws InterpreterException {
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isOp(p, env)) {
return matchApplOp(env, t, p);
}
else if (Tools.isInt(p, env)) {
return matchApplInt(env, t, p);
}
else if (Tools.isStr(p, env)) {
return null;
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
throw new InterpreterException("Unknown Appl case '" + p + "'");
}
示例2: matchInt
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchInt(IContext env, IStrategoInt t,
IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is Int");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isInt(p, env)) {
return matchIntInt(t, p);
}
else if (Tools.isReal(p, env)) {
return null;
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isOp(p, env)) {
return null;
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
} else if(Tools.isStr(p, env)) {
return null;
}
throw new InterpreterException("Unknown Int case '" + p + "'");
}
示例3: matchReal
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchReal(IContext env, IStrategoReal t,
IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is Real");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isInt(p, env)) {
return null;
}
else if (Tools.isReal(p, env)) {
return matchRealReal(t, p);
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isOp(p, env)) {
return null;
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
} else if (Tools.isStr(p, env)) {
return null;
}
throw new InterpreterException("Unknown Real case '" + p + "'");
}
示例4: matchBlob
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchBlob(IContext env, IStrategoTerm t, IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is Blob");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isExplode(p, env)) {
return null; // FIXME: explode blobs?
}
else if (Tools.isStr(p, env)) {
return null;
}
else if (Tools.isInt(p, env)) {
return null;
}
else if (Tools.isReal(p, env)) {
return null;
}
else if (Tools.isOp(p, env)) {
return null;
}
throw new InterpreterException("Unknown Tuple case '" + p + "'");
}
示例5: matchTuple
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchTuple(IContext env, IStrategoTuple t, IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is Tuple");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isInt(p, env)) {
return null;
}
else if (Tools.isReal(p, env)) {
return null;
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isOp(p, env)) {
return matchTupleOp(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isStr(p, env)) {
return null;
}
throw new InterpreterException("Unknown Tuple case '" + p + "'");
}
示例6: matchList
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchList(IContext env, IStrategoList t,
IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is List");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if (Tools.isInt(p, env)) {
return null;
}
else if (Tools.isReal(p, env)) {
return null;
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isOp(p, env)) {
return matchListOp(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isStr(p, env)) {
return null;
}
throw new InterpreterException("Unknown List case '" + p + "'");
}
示例7: matchString
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchString(IContext env, IStrategoString t, IStrategoAppl p) throws InterpreterException {
if (DebugUtil.isDebugging()) {
debug("term is String");
}
if (Tools.isAnno(p, env)) {
return matchAnyAnno(env, t, p);
}
else if(Tools.isStr(p, env)) {
return matchStrStr(env, t, p);
}
else if (Tools.isInt(p, env)) {
return null;
}
else if (Tools.isReal(p, env)) {
return null;
}
else if (Tools.isVar(p, env)) {
return matchAnyVar(t, p);
}
else if (Tools.isOp(p, env)) {
return null;
}
else if (Tools.isExplode(p, env)) {
return matchAnyExplode(env, t, p);
}
else if (Tools.isWld(p, env)) {
return matchAnyWld(p);
}
else if (Tools.isAs(p, env)) {
return matchCompoundAs(env, t, p);
}
throw new InterpreterException("Unknown String case '" + p + "'");
}