Commit Graph

139 Commits

Author SHA1 Message Date
Ryan Chandler
27d5705f85
parser/lexer: implement all assignment ops 2022-09-16 16:16:14 +01:00
Ryan Chandler
79bf633fac
chore: format 2022-09-16 15:20:49 +01:00
Ryan Chandler
e2065bf029
parser: support logical and, or, xor op 2022-09-16 15:20:16 +01:00
Ryan Chandler
a6388b3c57
parser: support <=> op 2022-09-16 15:16:23 +01:00
Ryan Chandler
a7d74e6b2d
parser/lexer: support <> op 2022-09-16 15:14:46 +01:00
Ryan Chandler
d99d931107
parser: support bitwise xor 2022-09-16 15:11:54 +01:00
Ryan Chandler
fb8ebd2484
parser: support % op 2022-09-16 15:07:41 +01:00
Ryan Chandler
d4c9db4203
parser: support print expressions 2022-09-16 14:59:44 +01:00
Ryan Chandler
33a481f13a
parser/lexer: support unary bitwise not 2022-09-16 14:47:06 +01:00
Ryan Chandler
dee9eb7f23
parser/lexer: support all types of prefix cast 2022-09-16 14:37:06 +01:00
Ryan Chandler
59ebb1ed2d
parser: add test case for call inside braced var 2022-09-16 10:21:37 +01:00
Ryan Chandler
9353c8fab1
lexer: produce single dollar tokens 2022-09-16 10:09:29 +01:00
Evan Shaw
1918f80799 lexer: implement binary strings 2022-09-16 16:48:09 +12:00
Evan Shaw
366004c30b lexer: implement octal, hex, and unicode string escapes 2022-09-16 09:13:10 +12:00
Evan Shaw
f8c0928cf7 lexer: handle double-quote whitespace escape sequences 2022-09-16 09:13:09 +12:00
Evan Shaw
446b984376 lexer: error on unterminated strings 2022-09-16 07:27:31 +12:00
Evan Shaw
353412a85a lexer: fully qualified identifier test 2022-09-15 22:12:02 +12:00
Evan Shaw
0e5499ebc8 lexer: re-work position tracking
Now span refers to the start of a token and position is tracked inside
the next method.
2022-09-15 22:07:50 +12:00
Ryan Chandler
1f0cd664da
parser/lexer: add support for goto statements 2022-09-15 01:15:52 +01:00
Ryan Chandler
7e7fd8a24d
parser/lexer: support __halt_compiler token 2022-09-14 23:55:42 +01:00
Evan Shaw
4cb19078c4 lexer: rename peek to peek_buf 2022-09-15 09:45:13 +12:00
Evan Shaw
ebd3798a24 lexer: remove char variable from tokenize 2022-09-15 09:45:05 +12:00
Evan Shaw
cbed61165f lexer: Rework lookahead 2022-09-15 09:45:00 +12:00
Evan Shaw
fd118ea0da lexer: simplify try_read 2022-09-15 07:57:45 +12:00
Evan Shaw
b6de94cd1e lexer: move larger match cases to separate methods 2022-09-15 07:57:45 +12:00
Ryan Chandler
ee253d510e
parser: move expression method over to Precedence logic 2022-09-13 15:20:40 +01:00
Ryan Chandler
9b3fbd12a4
parser: map some operators to new precedence 2022-09-13 14:10:48 +01:00
Ryan Chandler
067bac959a
parser: support backed enums with cases that have no backing value 2022-09-13 12:15:29 +01:00
Ryan Chandler
e63fe36008
all: clippy 2022-09-13 12:11:33 +01:00
Ryan Chandler
5e91a16175
parser: support readonly classes 2022-09-13 12:02:20 +01:00
Evan Shaw
d803e53a0a Remove serde dependency 2022-09-13 22:24:31 +12:00
Evan Shaw
447b1be197 Use ByteString through lexer and parser 2022-09-13 22:03:09 +12:00
Evan Shaw
843a00c523 Add ByteString type 2022-09-13 22:03:09 +12:00
Evan Shaw
f0fc4f190d Add a test case for non-UTF-8 variable name 2022-09-13 20:22:11 +12:00
Evan Shaw
f345389c32 Allow lexer to accept bytes as input 2022-09-13 17:19:47 +12:00
Evan Shaw
4c7047fbd1 Lex and parse in terms of bytes rather than characters 2022-09-13 17:01:24 +12:00
Ryan Chandler
c5e4632c15
parser: support global statements 2022-09-13 00:46:37 +01:00
Ryan Chandler
1e94b05ba6
lexer: fix nullsafe arrow token skipping too many characters 2022-09-13 00:25:59 +01:00
Ryan Chandler
d85913665f
chore: format 2022-09-12 15:16:07 +01:00
Ryan Chandler
fb8915819d
parser: support for error suppress expressions 2022-09-12 15:15:18 +01:00
Ryan Chandler
bdce626104
lexer&parser: better support for close tags 2022-09-12 12:31:01 +01:00
Ryan Chandler
a897328b69
parser: support do/while statements 2022-09-12 12:07:29 +01:00
Ryan Chandler
0f0629ff8b
Merge pull request #31 from edsrzf/parse-include 2022-09-12 11:45:51 +01:00
Evan Shaw
af1261355a Parse include and include_once 2022-09-12 22:29:28 +12:00
Evan Shaw
eb4398b0bd Fix off-by-one error when lexing variable names
This meant a variable named $a1 was treated as two separate tokens: the
variable $a, and an integer literal.
2022-09-12 22:05:46 +12:00
Evan Shaw
eec4a90fe1 rustfmt the rest of files 2022-09-12 07:45:05 +12:00
Evan Shaw
7b20d86777 Remove nightly Rust requirement 2022-09-11 16:04:55 +12:00
Evan Shaw
7d503e0c33 Rustfmt lexer 2022-09-11 15:53:09 +12:00
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