Nathanael Esayeas
ca697b4303
Add grammar for readonly classes
...
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com >
2024-03-07 22:08:27 +01:00
Ben Ramsey
287f3d0e12
Indicate space is allowed between "endswitch" and ";"
2024-03-03 12:26:05 +01:00
Superkooka
4c19272d1f
Fix markdown typo in spec/ ( #249 )
2023-02-24 00:43:29 +01:00
Carter Snook
f268abd419
fix(constants): remove duplicate E_USER_DEPRECATED def
...
Closes GH-256.
2022-12-12 13:50:56 +01:00
David Findley
f9d4f7480a
Namespace definition grammar fix ( #254 )
...
* Fix the `namespace-definition` production
The `namespace-definition` production was changed to use `name` instead
of `namespace-name` in c1ac531479 and a6520fb35b . This
appears to be a mistake, since `name` can not produce a `\`.
The spec was originally using `namespace-name` for
`namespace-definition`. This commit restores that grammar production.
* Regenerate using `tools/pre-commit`
It appears that the pre-commit scripts were not used to properly
regenerate the spec recently.
This caused some small styling changes (using html entities for some
chars).
It also caused a bigger change due to `print` being moved out of the
intrinsics section in 63d72a6df5 . It's not completely clear
if this was intentional or not, since `print` is a language intrinsic.
2022-02-05 20:57:00 +01:00
Tiffany
6e288468b6
Fix encoding for < to <
2021-05-06 20:19:38 -05:00
Rodion Efremov
8a7e96736a
Added missing $ to &colors.
...
Line 257 reads "$b = &colors[100];", but should be "$b = &$colors[100];".
2020-03-15 12:25:41 +01:00
Rodion Efremov
694b0290a6
Fixed the leftwards diagram arrows from < to <.
...
Some arrow diagrams are rendered as `<--` instead of `<--`.
2020-03-15 12:22:54 +01:00
Nikita Popov
5156669279
Adjust for PHP 8 negative array key change
2019-04-08 09:21:58 +02:00
Nikita Popov
231e64995d
Case-insensitive constants are no longer supported
2019-04-08 09:10:24 +02:00
Nikita Popov
5fc96c5dfd
(unset) casts are no longer supported since PHP 8
2019-04-08 09:02:56 +02:00
agares
fe55bee012
Define encoding of PHP scripts
2019-04-08 08:53:22 +02:00
Nikita Popov
fd81c6b8f6
Fix print-expression/yield-expression mixup
...
Fixes #236 .
2019-04-08 08:50:22 +02:00
David Walker
ee9565cf6a
Update spec for by-ref list RFC
2019-03-15 10:30:11 +01:00
Nikita Popov
9d99cf029b
Revert "Define encoding of PHP scripts"
...
This reverts commit f35bd70531 .
2019-03-15 10:30:07 +01:00
agares
f35bd70531
Define encoding of PHP scripts
...
1. Remove references to unicode codepoints (as those were ambigouous
without a defined encoding) and replace them with byte values
2. Define the encoding of PHP scripts as ASCII, where bytes greater than
0x7F are allowed
2019-03-15 10:08:58 +01:00
Nikita Popov
15aa45273f
Mark instanceof as left-associative
...
May not have been originally intended this way, but it's how the
language works right now, so specify it as such (#226 ).
2019-03-15 09:54:22 +01:00
Nikita Popov
63d72a6df5
Fix print precedence
2019-03-15 09:52:05 +01:00
Nikita Popov
b0dadd509b
Fix yield / yield from precedence
2019-03-15 09:47:54 +01:00
Nikita Popov
1058a50420
Fix precedence of by-ref assignment
...
Because it has variables on both sides, this is a primary expression.
2019-03-14 13:33:24 +01:00
zhujinxuan
197a397cf8
Add trialing comma description for constructs and functions
...
* Add trailing comma for
- isset and unset
- static and dynamic methods
- functions and closure as functions
- new statement
* Add or change the related tests to support the trialing comma
2018-12-22 13:27:47 +01:00
Peter Kokot
be010b4435
Sync final newlines
...
- Redundant final newlines trimmed into one
- Missing final newlines added where can be added
According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character although not
mandatory.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
2018-10-01 20:21:21 +02:00
Tyson Andre
b5b19c34aa
Fix typo in spec/
...
And remove trailing whitespace
2018-09-16 09:49:11 +02:00
Nikita Popov
15b92edd48
Support multiple catch
...
Fixes #216 .
2018-09-10 14:02:25 +02:00
Nikita Popov
b5ca441040
Continue on switch emits warning
2018-09-10 13:54:16 +02:00
Nikita Popov
ea03278e7e
Case-insensitive constants are deprecated
2018-09-10 13:47:58 +02:00
Tyson Andre
bbbcec63be
Fixes #217 : Incorrect rule for trait-select-insteadof-clause
...
An example of the insteadof clause (satisfies the fixed rule):
`use T1,T2,T3{T1::foo insteadof T2,T3;}`
2018-09-10 13:43:42 +02:00
Tyson Andre
8953d961e3
Fix typos in the specification markdown
...
Detected by https://github.com/client9/misspell
2018-09-10 13:39:18 +02:00
Alexander Holman MBCS AMIAP
63375439ff
Add missing core constants
...
Closes #214 .
2018-01-02 20:38:51 +01:00
James Gilliland
1dc4793ede
Fix statement capitalization
...
just making it consistent with the other items in the list.
2017-09-28 18:01:43 +02:00
Nikita Popov
dc3290165e
Note that LHS of :: can also be an object
2017-09-28 18:00:50 +02:00
Stephan Unverwerth
15f74073f9
Fix grammar for breakout-level
...
The optional breakout-level constant for `break` and `continue`
statements can also be enclosed in parentheses.
2017-09-26 09:26:40 +02:00
Nikita Popov
1baff21052
Fix some references
...
These got left behind after shuffling things around too much.
2017-09-19 11:46:34 +02:00
Nikita Popov
cbb78dacad
Move echo and unset from intrinsics to statements
2017-09-19 11:35:44 +02:00
Nikita Popov
57e9922e04
Move list() out of intrinsic section
...
This is not a general-purpose expression, it is only valid in
specific syntactic contexts.
2017-09-19 11:29:33 +02:00
Nikita Popov
08033b5158
Function arguments are arbitrary expressions
2017-09-19 11:17:00 +02:00
Nikita Popov
140cc0b4ff
yield has higher precedence than AND
2017-09-19 10:22:41 +02:00
Nikita Popov
c17f3a1eb7
Fix precedence in instanceof-subject
2017-09-19 10:12:18 +02:00
Nikita Popov
1aed868c28
Move pre-inc/dec and shell-exec into primary expression
...
Otherwise the precedence would be wrong...
2017-09-19 10:05:45 +02:00
Nikita Popov
def41da2f8
Merge postfix-expression into postfix-expression
...
The distinction is not meaningful, these are also primary
expressions.
2017-09-19 10:01:20 +02:00
Nikita Popov
4581ccd4a9
Fix clone precedence
2017-09-19 09:56:14 +02:00
Nikita Popov
733810097e
Fix ** operator precedence
2017-09-19 09:47:59 +02:00
Nikita Popov
b7f82175ab
Fix cast/suppression precedence
2017-09-19 09:35:19 +02:00
Nikita Popov
714f689270
Fix precedence of instanceof/logical not
...
Fixes #189 .
2017-09-19 09:31:35 +02:00
Nikita Popov
7d6ae47592
Remove cast-expression/unary-expression recursion
2017-09-19 09:21:02 +02:00
Nikita Popov
e3eb18b757
Don't require statement after label
...
Fixes #190 .
2017-09-19 08:51:25 +02:00
Nikita Popov
687ecf0dbc
Introduce new-variable for new/instanceof
...
Fixes #202 .
2017-09-19 08:47:48 +02:00
Nikita Popov
287030c352
Add nullable types
...
Fixed #196 .
2017-09-19 08:34:50 +02:00
Konrad Borowski
9cf8b200e5
Fix definition list rendering on GitHub in Terms and Definitions
2017-09-19 08:28:07 +02:00
Nikita Popov
4b8e976b52
Use variable in RHS of byref-assignment
2017-09-19 05:51:56 +02:00