From 3c51baa4167d5a68ff010dc81525b9340c5f1329 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 24 May 2014 14:45:13 +0200 Subject: Moved code into src subfolder and fixed docu --- src/ParseCompileError.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/ParseCompileError.php (limited to 'src/ParseCompileError.php') diff --git a/src/ParseCompileError.php b/src/ParseCompileError.php new file mode 100644 index 0000000..5ee37c7 --- /dev/null +++ b/src/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-70-g09d2