Closed domdefelice closed 13 years ago
The following code won't compile:
(defmacro with-database-connected (&body) "Executes `body' with database connected. Connection is closed after execution." '(do (require "open_db.php") ~@body (require "close_db.php")))
Error is: Fatal error: Call to a member function compile_statement() on a non-object in [...]/pharen/pharen.php on line 1353
Removing "require"s solves the problem. The only way I can use "do" is to put no more than one statement inside it.
Looks like the underlying issue is that it has trouble with non-splicing (~@) arguments after one. Eg: It'll compile if both require expressions come before ~@body. Working on this now.
The following code won't compile:
Error is: Fatal error: Call to a member function compile_statement() on a non-object in [...]/pharen/pharen.php on line 1353
Removing "require"s solves the problem. The only way I can use "do" is to put no more than one statement inside it.