Commit Graph

92 Commits

Author SHA1 Message Date
Ryan Chandler
0627e05642
parser: support /= 2022-08-10 00:50:04 +01:00
Ryan Chandler
a83f1b80bb
parser: support double/float cast 2022-08-10 00:46:27 +01:00
Ryan Chandler
5a44de9650
parser: support int cast 2022-08-10 00:41:35 +01:00
Ryan Chandler
cd45e0a423
parser: add support for (bool) cast 2022-08-10 00:31:00 +01:00
Ryan Chandler
efc6e7e7b9
parser: support -= op 2022-08-10 00:26:59 +01:00
Ryan Chandler
f273edc2ee
parser: add support for *= 2022-08-10 00:25:11 +01:00
Ryan Chandler
489cb0e884
lexer: produce nullsafe -> tokens 2022-08-09 21:23:47 +01:00
Ryan Chandler
e4ad01c545
parser: support while statements 2022-08-09 20:32:49 +01:00
Ryan Chandler
0ae93c2ea1
lexer: produce shorthand ternary tokens 2022-08-09 11:58:22 +01:00
Ryan Chandler
40c52a6e69
lexer: produce object cast tokens 2022-08-09 11:49:00 +01:00
Ryan Chandler
c2cacd4e95
lexer: allow numeric characters in variables after 1st alphabetic/underscore char 2022-08-09 11:43:27 +01:00
Ryan Chandler
4aa3b3af6b
parser: support concat assign op 2022-08-09 11:35:19 +01:00
Ryan Chandler
983c6edbd3
lexer: allow numeric characters in identifiers 2022-08-09 11:31:23 +01:00
Ryan Chandler
18a841e591
all: clippy 2022-08-09 00:54:04 +01:00
Ryan Chandler
30e0e5da60
lexer: support looking ahead based on string literal 2022-08-09 00:46:50 +01:00
Ryan Chandler
fb678c1e64
lexer: move away from shared character iterator
The Peekable<Chars> setup was quite limiting since we couldn't
easily do lookaheads for certain patterns.

The new setup involves a 1-step lookahead and tracking the current
character we're looking at. In theory, this makes it easier to do
bulk lookaheads, especially useful in finding complex tokens such as
(string), <?php, etc.
2022-08-09 00:31:07 +01:00
Ryan Chandler
ce4e1e1152
parser: support minimum yield expressions 2022-08-09 00:03:25 +01:00
Ryan Chandler
9ab82059a1
parser: support throw expressions
It's worth noting that a `throw` will always be an expression in the Trunk parser.
PHP-Parser will convert standalone `throw` expressions into a dedicated `throw`
statement for backwards-compatibility reasons.
2022-08-09 00:00:14 +01:00
Ryan Chandler
06cbbeff40
parser: start supporting reserved non modifiers as method names 2022-08-08 23:53:32 +01:00
Ryan Chandler
a238ebd579
lexer: produce instanceof tokens 2022-08-06 04:40:32 +01:00
Ryan Chandler
431d449f10
parser+lexer: support switch statements
Closes #4.
2022-08-04 10:53:41 +01:00
Ryan Chandler
65fa165ba8
parser+lexer: support try/catch/finally statements
Closes #17.
2022-08-04 00:41:27 +01:00
Ryan Chandler
b254e59bde
parser+lexer: support match expressions
Closes #16.
2022-08-04 00:21:10 +01:00
Ryan Chandler
38bf05f9f7
lexer: produce doc comments 2022-08-02 00:14:24 +01:00
Ryan Chandler
83aee4d171
phpc: compile conditionals, assignments and native fns 2022-08-01 14:13:53 +01:00
Ryan Chandler
212a46b2ac
lexer: produce increment tokens 2022-07-28 20:18:08 +01:00
Ryan Chandler
0322e3c805
parser: support normal for statements 2022-07-28 20:13:08 +01:00
Ryan Chandler
22d8cc332c
parser: support add assign operator 2022-07-28 20:07:40 +01:00
Ryan Chandler
67a26ae78f
parser: support clone expressions 2022-07-28 20:05:04 +01:00
Ryan Chandler
ad4f005511
parser: support null coalescing operator expressions (kinda) 2022-07-28 20:02:11 +01:00
Ryan Chandler
8f5a00b16d
lexer: fix fq identifiers and boolean or token 2022-07-28 17:53:05 +01:00
Ryan Chandler
d903fc5d79
parser&lexer: support for various things found in a Laravel app 2022-07-28 17:38:09 +01:00
Ryan Chandler
16283d1273
parser: support equals/identical and not variant expressions 2022-07-28 17:01:40 +01:00
Ryan Chandler
d5bef4e2ae
lexer: produce double colon tokens 2022-07-28 14:07:44 +01:00
Ryan Chandler
abd1559f31
parser: support foreach statements 2022-07-28 12:29:44 +01:00
Ryan Chandler
479b323cd9
parser: support variadic function params
Closes #9
2022-07-28 01:04:20 +01:00
Ryan Chandler
fbc48a5db5
parser: support empty / simplest switch statement 2022-07-28 00:30:32 +01:00
Ryan Chandler
e1eff91ee7
parser: support continue statements 2022-07-27 21:14:32 +01:00
Ryan Chandler
3ad45e6d1e
parser: support break statements 2022-07-27 20:59:20 +01:00
Ryan Chandler
f5c3143468
all: clippy 2022-07-26 17:56:10 +01:00
Ryan Chandler
d30e252c9d
all: remove let_chains feature 2022-07-26 14:07:08 +01:00
Ryan Chandler
e781ed186d
lexer: produce arrow tokens 2022-07-26 10:47:26 +01:00
Ryan Chandler
be40cd61c4
parser: support basic math ops 2022-07-25 20:16:18 +01:00
Ryan Chandler
b0ce1bdd30
lexer: produce new tokens 2022-07-25 19:06:53 +01:00
Ryan Chandler
5bba0f7269
parser: support long and short closures 2022-07-25 19:00:26 +01:00
Ryan Chandler
7cf833800e
lexer: produce trait tokens 2022-07-25 14:21:13 +01:00
Ryan Chandler
c5d89f8881
all: clippy 2022-07-25 01:17:17 +01:00
Ryan Chandler
67b4a086a1
lexer: produce interface tokens 2022-07-25 00:58:04 +01:00
Ryan Chandler
201a89fc4d
parser: support a fuller class parsing structure 2022-07-25 00:46:10 +01:00
Ryan Chandler
a8f06eb17c
lexer: rename BitAnd to Ampersand for consistency with Pipe 2022-07-23 16:04:11 +01:00