From d48be01fff31a7a9d611802721aa70532d251c3a Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 24 May 2014 14:55:11 +0200 Subject: Moved to src/ste for psr-4 compliance --- src/ste/ParseCompileError.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/ste/ParseCompileError.php (limited to 'src/ste/ParseCompileError.php') diff --git a/src/ste/ParseCompileError.php b/src/ste/ParseCompileError.php new file mode 100644 index 0000000..5ee37c7 --- /dev/null +++ b/src/ste/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