Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for constants with array values implemented.
- Loading branch information
Manuel Pichler
committed
Sep 20, 2015
1 parent
5b48bf3
commit 1209b0e
Showing
11 changed files
with
133 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...e/Language/PHP/PHPParserGenericVersion56/testConstantSupportForArrayWithKeyValuePairs.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
class testConstantSupportForArrayWithKeyValuePairs | ||
{ | ||
const FOO = [ | ||
'January' => 'January', | ||
'February' => 'February', | ||
// … | ||
]; | ||
} |
8 changes: 8 additions & 0 deletions
8
...age/PHP/PHPParserGenericVersion56/testConstantSupportForArrayWithSelfReferenceInClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
class testConstantSupportForArrayWithSelfReferenceInClass | ||
{ | ||
const A = 42; | ||
const B = 23; | ||
|
||
const C = [self::A, self::B]; | ||
} |
8 changes: 8 additions & 0 deletions
8
...PHP/PHPParserGenericVersion56/testConstantSupportForArrayWithSelfReferenceInInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
interface testConstantSupportForArrayWithSelfReferenceInInterface | ||
{ | ||
const A = 42; | ||
const B = 23; | ||
|
||
const C = [self::A, self::B]; | ||
} |
10 changes: 10 additions & 0 deletions
10
...s/Source/Language/PHP/PHPParserGenericVersion56/testConstantSupportForArrayWithValues.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
class testConstantSupportForScalarArrayValues | ||
{ | ||
const FOO = [ | ||
'string', | ||
'int', | ||
'float', | ||
'bool' | ||
]; | ||
} |
6 changes: 0 additions & 6 deletions
6
...urces/files/issues/079/testParserThrowsExpectedExceptionForArrayInConstantDeclaration.php
This file was deleted.
Oops, something went wrong.