diff --git a/src/PHPSQLParser/lexer/PHPSQLLexer.php b/src/PHPSQLParser/lexer/PHPSQLLexer.php index be2e1be5..326c8c03 100644 --- a/src/PHPSQLParser/lexer/PHPSQLLexer.php +++ b/src/PHPSQLParser/lexer/PHPSQLLexer.php @@ -212,6 +212,7 @@ protected function concatComments($tokens) { $cnt = count($tokens); $comment = false; $in_string = false; + $inline = false; while ($i < $cnt) { if (!isset($tokens[$i])) { @@ -220,7 +221,7 @@ protected function concatComments($tokens) { } $token = $tokens[$i]; - if($token == "\"" || $token == "'") { + if($comment === false && ($token == "\"" || $token == "'")) { $in_string = !$in_string; } if(!$in_string) {