From fad93506cd56b976d1413ed5adef87701df715bd Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 18 May 2014 00:25:49 +0200 Subject: One file per class and new namespace. We should be able to use a PSR4 autoloader (like composer's) now. ste.php is still there as a fallback for old applications. --- ParseCompileError.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ParseCompileError.php (limited to 'ParseCompileError.php') diff --git a/ParseCompileError.php b/ParseCompileError.php new file mode 100644 index 0000000..5ee37c7 --- /dev/null +++ b/ParseCompileError.php @@ -0,0 +1,22 @@ +msg = $msg; + $this->tpl = $tpl; + $this->off = $offset; + $this->message = "$msg (Template $tpl, Offset $offset)"; + } + + public function rewrite($code) { + $line = substr_count(str_replace("\r\n", "\n", substr($code, 0, $this->off)), "\n") + 1; + $this->message = "{$this->msg} (Template {$this->tpl}, Line $line)"; + $this->is_rewritten = true; + } +} -- cgit v1.2.3-54-g00ecf