Ryan Chandler
af2b8fc5eb
parser: support method calls on static
2022-08-09 12:07:09 +01:00
Ryan Chandler
ef1ccd7bda
parser: bodge comments between expressions
2022-08-09 12:03:16 +01:00
Ryan Chandler
2fb879b763
parser: support short-hand ternaries
2022-08-09 12:00:35 +01:00
Ryan Chandler
0ae93c2ea1
lexer: produce shorthand ternary tokens
2022-08-09 11:58:22 +01:00
Ryan Chandler
dc4cb10ac3
parser: add match as soft reserved keyword
2022-08-09 11:56:23 +01:00
Ryan Chandler
e8fe61e430
parser: add default and enum as soft reserved keywords
2022-08-09 11:55:42 +01:00
Ryan Chandler
5309451588
parser: allow using array & callable at type strings
2022-08-09 11:54:47 +01:00
Ryan Chandler
626af3e31c
parser: bodge comments by skipping them in classes
2022-08-09 11:50:35 +01:00
Ryan Chandler
5e6f976f29
parser: support object cast prefix ops
2022-08-09 11:49:06 +01:00
Ryan Chandler
40c52a6e69
lexer: produce object cast tokens
2022-08-09 11:49:00 +01:00
Ryan Chandler
72e744c4ad
parser: support taking foreach value vars by ref
2022-08-09 11:46:28 +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
698aef1afc
parser: support using closure args by ref
2022-08-09 11:39:40 +01:00
Ryan Chandler
4aa3b3af6b
parser: support concat assign op
2022-08-09 11:35:19 +01:00
Ryan Chandler
e17d66e2d8
parser: roughly support inc/dec postfix ops
2022-08-09 11:33: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
223018ef5f
parser: add support for prefix cast ops
2022-08-09 00:51:03 +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
c71bcadbf0
parser: support prefix minus / negation
2022-08-09 00:05:42 +01:00
Ryan Chandler
d898216706
parser: support float expressions
2022-08-09 00:04:14 +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
56310906a8
parser: skip comments inside of arrays
2022-08-08 23:44:11 +01:00
Ryan Chandler
1d5906bc08
parser: skip comments before parsing expression
2022-08-08 23:43:20 +01:00
Ryan Chandler
863f1aaddb
parser: skip doc comments for now
2022-08-08 23:42:19 +01:00
Ryan Chandler
97b2fa0c67
parser: support function/const use statements
2022-08-08 22:10:16 +01:00
Ryan Chandler
efa730219d
gc: allow dead code
2022-08-08 22:08:13 +01:00
Ryan Chandler
bcf28f8e19
gc: remove Tracer logic
2022-08-08 22:03:53 +01:00
Ryan Chandler
60c58dfcdb
gc: initial work on a glorified heap
2022-08-08 18:52:49 +01:00
Ryan Chandler
d56e834bc8
gc: init
2022-08-08 11:57:10 +01:00
Ryan Chandler
10b3e86248
interner: README
2022-08-08 11:55:18 +01:00
Ryan Chandler
d6fb3663cc
interner: document symbol type
2022-08-08 11:52:13 +01:00
Ryan Chandler
cee6beac75
interner: document methods
2022-08-08 11:51:10 +01:00
Ryan Chandler
08ca5a7295
interner: minimal working version
2022-08-08 11:47:17 +01:00
Ryan Chandler
37733dce29
interner: init
2022-08-08 11:40:19 +01:00
Ryan Chandler
3eb8429ab6
value: start adding tests for overloaded ops
2022-08-06 11:28:15 +01:00
Ryan Chandler
e0378e24a2
parser: support instanceof expressions
2022-08-06 04:43:19 +01:00
Ryan Chandler
a238ebd579
lexer: produce instanceof tokens
2022-08-06 04:40:32 +01:00
Ryan Chandler
1d1af9f1b8
parser: support pow (**) expressions
2022-08-06 04:39:00 +01:00
Ryan Chandler
2668710fc8
parser: make ternary an infix expression to ensure correct precedence
2022-08-06 01:40:50 +01:00
Ryan Chandler
f488e584bd
parser: support enums
2022-08-05 23:18:29 +01:00
Ryan Chandler
63d3c4bffd
value: add basic value types with support for arithmetic ops
2022-08-05 17:10:52 +01:00
Ryan Chandler
a85285a3d6
value: init
2022-08-05 10:59:00 +01:00
Ryan Chandler
9b8bbdf8f9
wip
2022-08-05 10:57:57 +01:00
Ryan Chandler
82702d4070
phpc: goodbye
...
I'm removing the original phpc prototype and will be reimplementing a better
version as the Trunk Compiler project.
2022-08-04 20:07:25 +01:00
Ryan Chandler
2cad6fde6a
parser: allow forcing param, prop and return types
2022-08-04 13:37:08 +01:00
Ryan Chandler
b2db93efc1
parser: expect colons
2022-08-04 13:22:47 +01:00