diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7c36c..1762f8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Version 0.9.2-dev ----------------- +* [BC] Due to the below changes nodes now optionally accept an `$attributes` array as the + last parameter, instead of the previously used `$line` and `$docComment` parameters. + * Add mechanism for adding attributes to nodes in the lexer. The following attributes are now added by default: diff --git a/lib/PHPParser/Comment.php b/lib/PHPParser/Comment.php index d23f4a2..3417e50 100644 --- a/lib/PHPParser/Comment.php +++ b/lib/PHPParser/Comment.php @@ -65,9 +65,7 @@ class PHPParser_Comment // // is handled by replacing the whitespace sequences before the * by a single space return preg_replace('(^\s+\*)m', ' *', $this->text); - } elseif (preg_match('((*BSR_ANYCRLF)^/\*\*?\s\R)', $text) - && preg_match('((*BSR_ANYCRLF)\R(\s*)\*/$)', $text, $matches) - ) { + } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { // Multi line comment of the type // // /*