diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Lexer.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Lexer.php b/src/Lexer.php index 2a3fea4..31454b1 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -546,6 +546,10 @@ class Lexer extends Core ) { $token .= $this->str[$this->last]; } + // Include trailing \n as whitespace token + if ($this->last < $this->len) { + $this->last--; + } return new Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_BASH); } @@ -616,6 +620,10 @@ class Lexer extends Core $token .= $this->str[$this->last]; } } + // Include trailing \n as whitespace token + if ($this->last < $this->len) { + $this->last--; + } return new Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL); } |