Skip to content

Commit

Permalink
Fix last dynsem test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfokkema committed Jun 8, 2016
1 parent c770dc4 commit 54f2eee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.spoofax.interpreter.terms.IStrategoConstructor;
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.interpreter.terms.ITermFactory;
import org.spoofax.jsglr.client.imploder.ImploderAttachment;
import org.spoofax.terms.StrategoString;
import org.spoofax.terms.TermFactory;

Expand Down Expand Up @@ -176,7 +175,7 @@ private void initializeExecutionEnvironment()
ITermFactory termFactory = termFactService.getGeneric();
IStrategoConstructor termConstr = termFactory.makeConstructor("ShellInit", 0);
IStrategoAppl shellInitAppl = termFactory.makeAppl(termConstr);
ImploderAttachment.putImploderAttachment(shellInitAppl, false, "ShellInit", null, null);
StrategoUtil.setSortForTerm(shellInitAppl, "ShellInit");
Value shellInitRule = polyglotEngine.findGlobalSymbol(RuleRegistry
.makeKey("init", termConstr.getName(), termConstr.getArity()));
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
import javax.annotation.Nullable;

import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.jsglr.client.imploder.IToken;
import org.spoofax.jsglr.client.imploder.ImploderAttachment;
import org.spoofax.jsglr.client.imploder.Token;

/**
* Contains utility functions for dealing with {@link IStrategoTerm}s.
*/
public final class StrategoUtil {
private static final Token BOGUS_TOKEN = new Token(null, 0, 0, 0, 0, 0,
IToken.TK_NO_TOKEN_KIND);

/* private due to checkstyle. */
private StrategoUtil() {
Expand All @@ -22,7 +26,7 @@ private StrategoUtil() {
*/
public static void setSortForTerm(IStrategoTerm term, String sort) {
ImploderAttachment.putImploderAttachment(term, false,
sort, null, null);
sort, BOGUS_TOKEN, BOGUS_TOKEN);
}

/**
Expand Down

0 comments on commit 54f2eee

Please sign in to comment.