Skip to content

Commit

Permalink
Fix a typo: Dereferencable to Dereferenceable
Browse files Browse the repository at this point in the history
  • Loading branch information
rainx authored and nikic committed Jun 12, 2024
1 parent db1963f commit 3ef0811
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions grammar/php.y
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ class_name_reference:

class_name_or_var:
class_name
| fully_dereferencable
| fully_dereferenceable
;

exit_expr:
Expand Down Expand Up @@ -1184,7 +1184,7 @@ array_short_syntax:
$$ = new Expr\Array_($2, $attrs); }
;

dereferencable_scalar:
dereferenceable_scalar:
T_ARRAY '(' array_pair_list ')'
{ $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
$$ = new Expr\Array_($3, $attrs);
Expand All @@ -1201,7 +1201,7 @@ scalar:
T_LNUMBER
{ $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); }
| T_DNUMBER { $$ = Scalar\Float_::fromString($1, attributes()); }
| dereferencable_scalar
| dereferenceable_scalar
| constant
| class_constant
| T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
Expand All @@ -1217,34 +1217,34 @@ optional_expr:
| expr
;

fully_dereferencable:
fully_dereferenceable:
variable
| '(' expr ')' { $$ = $2; }
| dereferencable_scalar
| dereferenceable_scalar
| class_constant
| new_dereferenceable
;

array_object_dereferencable:
fully_dereferencable
array_object_dereferenceable:
fully_dereferenceable
| constant
;

callable_expr:
callable_variable
| '(' expr ')' { $$ = $2; }
| dereferencable_scalar
| dereferenceable_scalar
| new_dereferenceable
;

callable_variable:
simple_variable
| array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| array_object_dereferenceable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| array_object_dereferenceable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
| function_call
| array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list
| array_object_dereferenceable T_OBJECT_OPERATOR property_name argument_list
{ $$ = Expr\MethodCall[$1, $3, $4]; }
| array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list
| array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list
{ $$ = Expr\NullsafeMethodCall[$1, $3, $4]; }
;

Expand All @@ -1256,9 +1256,9 @@ optional_plain_variable:
variable:
callable_variable
| static_member
| array_object_dereferencable T_OBJECT_OPERATOR property_name
| array_object_dereferenceable T_OBJECT_OPERATOR property_name
{ $$ = Expr\PropertyFetch[$1, $3]; }
| array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name
| array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name
{ $$ = Expr\NullsafePropertyFetch[$1, $3]; }
;

Expand Down

0 comments on commit 3ef0811

Please sign in to comment.