Commit Graph

647 Commits

Author SHA1 Message Date
Ryan Chandler
630ad85f34
parser: support named functions returning refs 2022-09-15 00:42:28 +01:00
Ryan Chandler
2d09a251d3
parser: support function params being marked as refs 2022-09-15 00:15:31 +01:00
Ryan Chandler
17c5307e4f
parser: add test cases for foreach refs 2022-09-15 00:09:01 +01:00
Ryan Chandler
b237f2b7d7
Merge pull request #81 from ryangjchandler/feature/static-closures 2022-09-15 00:05:31 +01:00
Ryan Chandler
0145e58834
parser: support static closures 2022-09-15 00:04:27 +01:00
Ryan Chandler
0146d3e1d1
Merge pull request #80 from ryangjchandler/feature/halt-compiler 2022-09-14 23:57:11 +01:00
Ryan Chandler
7e7fd8a24d
parser/lexer: support __halt_compiler token 2022-09-14 23:55:42 +01:00
Ryan Chandler
8f520732e2
Merge pull request #79 from ryangjchandler/feature/braced-global-namespace 2022-09-14 23:39:02 +01:00
Ryan Chandler
f7ae8fb868
feature: support global braced namespace 2022-09-14 23:37:47 +01:00
Ryan Chandler
3ab37c219f
Merge pull request #78 from edsrzf/lexer-refactor 2022-09-14 23:27:04 +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
ba73ddbac3
all: clippy 2022-09-14 12:04:38 +01:00
Ryan Chandler
53921a1207
Merge pull request #41 from ryangjchandler/refactor/operator-precedence 2022-09-14 12:02:52 +01:00
Ryan Chandler
16af78d56d
chore: format 2022-09-14 12:01:30 +01:00
Ryan Chandler
2b7d41812f
parser: get failing test cases passing on precedence changes 2022-09-14 12:01:10 +01:00
Ryan Chandler
b384bb81ec
parser: prevent non-associative and equal precedence operators being used in same expression 2022-09-13 21:01:30 +01:00
Ryan Chandler
be4e54c5be
parser: add associativity mappings 2022-09-13 20:46:16 +01:00
Ryan Chandler
f4de25d2dc
parser: add precedence for ** operator 2022-09-13 15:24:16 +01:00
Ryan Chandler
ee253d510e
parser: move expression method over to Precedence logic 2022-09-13 15:20:40 +01:00
Ryan Chandler
5874fc50e0
chore: format 2022-09-13 14:10:49 +01:00
Ryan Chandler
9b3fbd12a4
parser: map some operators to new precedence 2022-09-13 14:10:48 +01:00
Ryan Chandler
860e16368b
parser: create Precedence and Associativity enums 2022-09-13 14:09:20 +01:00
Ryan Chandler
1c90b5e907
Merge pull request #68 from ryangjchandler/fix/backed-enums-without-values 2022-09-13 12:16:15 +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
5eefe38ec0
Merge pull request #65 from ryangjchandler/feature/readonly-properties 2022-09-13 12:09:51 +01:00
Ryan Chandler
4f64297907
parser: support readonly class properties 2022-09-13 12:08:41 +01:00
Ryan Chandler
736964de7a
Merge pull request #64 from ryangjchandler/feature/readonly-classes 2022-09-13 12:03:19 +01:00
Ryan Chandler
5e91a16175
parser: support readonly classes 2022-09-13 12:02:20 +01:00
Ryan Chandler
f79a1adf95
Merge pull request #63 from edsrzf/switch-case-semicolon 2022-09-13 12:00:42 +01:00
Evan Shaw
032d5539e8 Switch cases can be terminated with semicolons 2022-09-13 22:53:07 +12:00
Ryan Chandler
321e49f191
Merge pull request #62 from ryangjchandler/feature/top-level-multi-const 2022-09-13 11:51:12 +01:00
Ryan Chandler
48236ceb9e
parser: add support for multiple constants in one statement 2022-09-13 11:50:40 +01:00
Ryan Chandler
d70b2685ff
Merge pull request #61 from ryangjchandler/fix/empty-array-items 2022-09-13 11:42:57 +01:00
Ryan Chandler
8191b56795
chore: format 2022-09-13 11:41:53 +01:00
Ryan Chandler
61c04bb616
fix: support empty array items 2022-09-13 11:41:02 +01:00
Ryan Chandler
c023468c0d
Merge pull request #57 from edsrzf/byte-lexer 2022-09-13 11:33:49 +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
2521727a6e
Merge pull request #56 from ryangjchandler/feature/basic-declare-support 2022-09-13 01:01:25 +01:00
Ryan Chandler
d9d3ffbb47
parser: support declare statement with postfix block 2022-09-13 00:59:12 +01:00
Ryan Chandler
bbfce83894
parser: add test case for multiple declares in same statement 2022-09-13 00:54:01 +01:00