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
Ryan Chandler
1a7447de4b
parser: introduce new ParserConfig
2022-08-04 13:21:14 +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
1a7aae97d9
parser: move Expression enum to struct format instead of tuple
...
Closes #11 .
2022-08-04 00:03:50 +01:00
Ryan Chandler
d602902d7b
parser: make Assign an InfixOp instead of expression type
...
Closes #14
2022-08-03 20:50:07 +01:00
Ryan Chandler
5eca385a9a
parser: abstract out optional comma logic
2022-08-03 13:51:20 +01:00
Ryan Chandler
3cf8f44d57
phpc: remove binary
2022-08-02 13:32:14 +01:00
Ryan Chandler
38bf05f9f7
lexer: produce doc comments
2022-08-02 00:14:24 +01:00
Ryan Chandler
336ae90a18
wip
2022-08-01 14:14:17 +01:00
Ryan Chandler
83aee4d171
phpc: compile conditionals, assignments and native fns
2022-08-01 14:13:53 +01:00
Ryan Chandler
8d1394bd3d
phpc: blog post and complete overhaul
2022-07-31 02:37:10 +01:00
Ryan Chandler
13d0281897
misc: remove binary file
2022-07-30 12:32:40 +01:00
Ryan Chandler
223df961ce
rs: experiment with a PHP to Rust to binary compiler
2022-07-29 16:32:25 +01:00