Home
last modified time | relevance | path

Searched refs:Cast (Results 1 – 16 of 16) sorted by relevance

/PHP-Parser/lib/PhpParser/Node/Expr/Cast/
H A DArray_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Array_ extends Cast {
H A DBool_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Bool_ extends Cast {
H A DInt_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Int_ extends Cast {
H A DObject_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Object_ extends Cast {
H A DString_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class String_ extends Cast {
H A DUnset_.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Unset_ extends Cast {
H A DDouble.php3 namespace PhpParser\Node\Expr\Cast;
5 use PhpParser\Node\Expr\Cast; alias
7 class Double extends Cast {
/PHP-Parser/lib/PhpParser/Node/Expr/
H A DCast.php7 abstract class Cast extends Expr { class
/PHP-Parser/test/PhpParser/
H A DParserTestAbstract.php176 ["(float) 5.0", ['kind' => Expr\Cast\Double::KIND_FLOAT]],
177 ["(double) 5.0", ['kind' => Expr\Cast\Double::KIND_DOUBLE]],
178 ["(real) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]],
179 [" ( REAL ) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]],
/PHP-Parser/lib/PhpParser/
H A DPrettyPrinterAbstract.php13 use PhpParser\Node\Expr\Cast; alias
47 Cast\Int_::class => [ 10, -1, -1],
48 Cast\Double::class => [ 10, -1, -1],
49 Cast\String_::class => [ 10, -1, -1],
50 Cast\Array_::class => [ 10, -1, -1],
51 Cast\Object_::class => [ 10, -1, -1],
52 Cast\Bool_::class => [ 10, -1, -1],
53 Cast\Unset_::class => [ 10, -1, -1],
1386 Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class,
1387 Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class,
H A DParserAbstract.php13 use PhpParser\Node\Expr\Cast\Double;
/PHP-Parser/lib/PhpParser/PrettyPrinter/
H A DStandard.php9 use PhpParser\Node\Expr\Cast; alias
483 … protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string {
484 … return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence);
488 $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE);
489 if ($kind === Cast\Double::KIND_DOUBLE) {
491 } elseif ($kind === Cast\Double::KIND_FLOAT) {
494 assert($kind === Cast\Double::KIND_REAL);
504 …protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): strin…
512 …protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string {
513 … return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence);
[all …]
/PHP-Parser/grammar/
H A Dphp.y1071 | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; }
1075 $$ = new Expr\Cast\Double($2, $attrs); }
1076 | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; }
1077 | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; }
1078 | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; }
1079 | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; }
1080 | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; }
/PHP-Parser/lib/PhpParser/Parser/
H A DPhp7.php2366 …$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self-…
2371 $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs);
2374 …$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($se…
2377 …$self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($sel…
2380 …$self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($se…
2383 …$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self…
2386 …$self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($sel…
H A DPhp8.php2368 …$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self-…
2373 $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs);
2376 …$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($se…
2379 …$self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($sel…
2382 …$self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($se…
2385 …$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self…
2388 …$self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($sel…
/PHP-Parser/
H A DCHANGELOG.md622 * Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`,

Completed in 66 milliseconds