Skip to content

Commit

Permalink
Extend refret
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jan 24, 2023
1 parent 74a38dd commit 6c98ee5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions example/tiger/spoofax3/tiger.spoofax3/src/refret.str2
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ module refret
imports
strategolib
//signatures/Tiger-sig
imports
libspoofax/analysis/constraint
statix/runtime/analysis
statix/runtime/ast

strategies

inline-method-call(|name, analysis) = debug(!"Inlining: ");
//prim("RR_create_placeholder", ["abc"]);
prim("RR_fix_references", analysis);
debug(!"Inlined: ")
inline-method-call(|call, solverResultTerm): ast -> newAst
where where(<debug(!"Inlining call: ")> call);
a := <stx--get-ast-analysis> ast;
r := <stx--get-ast-property(|a,Ref())>
where(<debug(!"Ref: ")> r);
//prim("RR_create_placeholder", ["abc"]);
//prim("RR_fix_references", analysis);
newAst := ast; // TODO
debug(!"Inlined: ")

0 comments on commit 6c98ee5

Please sign in to comment.