diff --git a/src/Compiler.php b/src/Compiler.php index b19b9e56..622b95bb 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -164,6 +164,10 @@ public function __construct() */ public function compile($code, $path = null) { + if(is_file($code)){ + $this->setImportPaths(dirname($code)); + $code=file_get_contents($code); + } $locale = setlocale(LC_NUMERIC, 0); setlocale(LC_NUMERIC, 'C');