Skip to content

Instantly share code, notes, and snippets.

@francescoagati
Created January 20, 2011 19:42
Show Gist options
  • Save francescoagati/788485 to your computer and use it in GitHub Desktop.
Save francescoagati/788485 to your computer and use it in GitHub Desktop.
pharen php evalutation
class PhpNode extends SpecialForm{
public $body_index = 2;
public function compile_statement(){
$body = $this->compile_body();
eval("\$body=$body");
echo $body;
return $this->format_line($body);
}
}
......
"php" => array("PhpNode", "LeafNode", "LeafNode", self::$values),
(write-variable-macro)
(defmacro write-variable-macro ()
(def var1 "value var 1")
'(php (. "" ~var1 "" ~var1 " " ~var1))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment