Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Oct 25, 2024
1 parent 229dbd2 commit 5faa7ff
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package chester.truffle.node;

import chester.syntax.core.BooleanTermC;
import chester.syntax.core.TermMeta;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.NodeInfo;
import scala.Option;

@NodeInfo(shortName = "bool")
public final class BooleanNode extends LiteralNode implements BooleanTermC<TermNode> {
final boolean value;
final Option<TermMeta> meta;

public BooleanNode(boolean value, Option<TermMeta> meta) {
this.value = value;
this.meta = meta;
}

@Override
public Object executeGeneric(VirtualFrame frame) {
return value;
}

@Override
public boolean value() {
return value;
}

@Override
public Option<TermMeta> meta() {
return meta;
}
}

This file was deleted.

0 comments on commit 5faa7ff

Please sign in to comment.