[ClavaWeaver] Implements CxxWeaver.fromNode()
@@ -45,6 +45,7 @@ import pt.up.fe.specs.clava.context.ClavaFactory;
import pt.up.fe.specs.clava.language.Standard;
import pt.up.fe.specs.clava.parsing.snippet.SnippetParser;
import pt.up.fe.specs.clava.utils.SourceType;
+import pt.up.fe.specs.clava.weaver.abstracts.ACxxWeaverJoinPoint;
import pt.up.fe.specs.clava.weaver.abstracts.weaver.ACxxWeaver;
import pt.up.fe.specs.clava.weaver.gears.InsideApplyGear;
import pt.up.fe.specs.clava.weaver.gears.ModifiedFilesGear;
@@ -1994,4 +1995,13 @@ public class CxxWeaver extends ACxxWeaver {
public int getStackSize() {
return context.getStackSize();
}
+
+ @Override
+ public ACxxWeaverJoinPoint fromNode(Object node) {
+ if (!(node instanceof ClavaNode)) {
+ throw new RuntimeException("Expected a ClavaNode, but got a " + node.getClass());
+ }
+
+ return CxxJoinpoints.create((ClavaNode) node);
+ }
}
