-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from eric-therond/addphpattributes
add support of php attributes
- Loading branch information
Showing
15 changed files
with
397 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
composer.lock | ||
test.php | ||
vendor/ | ||
.idea/ | ||
.idea/ | ||
.phpunit.result.cache |
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,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of PHP-CFG, a Control flow graph implementation for PHP | ||
* | ||
* @copyright 2015 Anthony Ferrara. All rights reserved | ||
* @license MIT See LICENSE at the root of the project for more info | ||
*/ | ||
|
||
namespace PHPCfg\Op\Attributes; | ||
|
||
use PHPCfg\Op; | ||
use PhpCfg\Operand; | ||
|
||
class Attribute extends Op | ||
{ | ||
public Operand $name; | ||
|
||
public array $args; | ||
|
||
public function __construct(Operand $name, array $args, array $attributes = []) | ||
{ | ||
parent::__construct($attributes); | ||
$this->name = $this->addReadRef($name); | ||
$this->args = $args; | ||
} | ||
} |
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of PHP-CFG, a Control flow graph implementation for PHP | ||
* | ||
* @copyright 2015 Anthony Ferrara. All rights reserved | ||
* @license MIT See LICENSE at the root of the project for more info | ||
*/ | ||
|
||
namespace PHPCfg\Op\Attributes; | ||
|
||
use PHPCfg\Op; | ||
|
||
class AttributeGroup extends Op | ||
{ | ||
public array $attrs; | ||
|
||
public function __construct(array $attrs, array $attributes = []) | ||
{ | ||
parent::__construct($attributes); | ||
$this->attrs = $attrs; | ||
} | ||
} |
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
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
Oops, something went wrong.