本文整理汇总了Java中org.spoofax.interpreter.terms.TermConverter类的典型用法代码示例。如果您正苦于以下问题:Java TermConverter类的具体用法?Java TermConverter怎么用?Java TermConverter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TermConverter类属于org.spoofax.interpreter.terms包,在下文中一共展示了TermConverter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: call
import org.spoofax.interpreter.terms.TermConverter; //导入依赖的package包/类
@Override
public boolean call(IContext env, Strategy[] svars, IStrategoTerm[] tvars) {
ITermFactory factory = env.getFactory();
if (!ParentTermFactory.isParentTermFactory(factory))
factory = new ParentTermFactory(factory);
TermConverter converter = new TermConverter(factory);
converter.setOriginEnabled(true);
env.setCurrent(converter.convert(tvars[0]));
return true;
}
示例2: implode
import org.spoofax.interpreter.terms.TermConverter; //导入依赖的package包/类
private IStrategoTerm implode(ATerm asfix) {
IStrategoTerm wrappedTerm = Environment.getWrappedTermFactory().wrapTerm(asfix);
IStrategoTerm term = TermConverter.convert(Environment.getTermFactory(), wrappedTerm);
stratego_sglr.init(imploder.getCompiledContext());
return implode_asfix_0_0.instance.invoke(imploder.getCompiledContext(), term);
}
示例3: TermAttachmentStripper
import org.spoofax.interpreter.terms.TermConverter; //导入依赖的package包/类
public TermAttachmentStripper(ITermFactory factory) {
this.factory = factory;
this.converter = new TermConverter(factory);
}