Commit Graph

668 Commits

Author SHA1 Message Date
Ryan Chandler
b73c7ea9d1
fix: allow using semi reserved ident as argument name 2022-12-05 14:01:34 +00:00
Ryan Chandler
b1f10231e0
parser: allow passing array items by ref 2022-12-05 13:55:35 +00:00
Ryan Chandler
5815f65737
fix: various bits 2022-12-05 13:46:48 +00:00
Ryan Chandler
4c8c117114
chore: typo 2022-12-05 13:42:34 +00:00
Ryan Chandler
435a3aa12b
chore: temporarily skip some stuff 2022-12-05 13:39:59 +00:00
azjezz
45ab4cc955
chore: format integration tests
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 13:46:08 +01:00
azjezz
7ab417c801
fix: formatting
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 13:37:05 +01:00
azjezz
444e19b579 chore: replace Makefile with Justfile
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 13:33:05 +01:00
Ryan Chandler
4b73900b59
lexer: fix comment tokenization skipping next character 2022-12-05 12:23:31 +00:00
Ryan Chandler
aa9f33a726
parser: allow comma-separated expressions in for statements 2022-12-05 12:14:54 +00:00
Ryan Chandler
9ad4ee7bc8
chore: allow skipping certain files in third party tests 2022-12-05 11:59:28 +00:00
azjezz
209196ab12
chore: clean up makefile
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 13:00:02 +01:00
azjezz
e7be510d51
chore: make test target accept additional arguments
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 12:58:58 +01:00
azjezz
e3960994d0 chore: add makefile
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 12:56:08 +01:00
Ryan Chandler
2e68dd8f35
lexer: fix escape sequences in encapsed double quoted string 2022-12-05 11:50:44 +00:00
azjezz
3ab03bc3e1
fix: formatting
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 12:32:36 +01:00
Ryan Chandler
2d2ab36083
lexer&parser: support backtick (shell exec) strings
Closes #49
2022-12-05 09:57:45 +00:00
Ryan Chandler
b00aa3ae4b
fix: allow using include/require calls as expressions 2022-12-05 09:48:40 +00:00
Ryan Chandler
31d9cef5aa
fix: allow omitting semi colon before closing tag
Closes #156.
2022-12-05 09:38:23 +00:00
azjezz
23dda4d603
fix: formatting
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 07:17:19 +01:00
Ryan Chandler
d71600ee65
parser: workaround for assignment by ref 2022-12-05 00:32:40 +00:00
Ryan Chandler
e8b58ba52b
parser: produce static expressions as new target 2022-12-05 00:23:38 +00:00
Ryan Chandler
f65d8eefc0
chore: add laravel framework as third party test 2022-12-05 00:18:20 +00:00
Ryan Chandler
0f54c4046f
chore: fmt 2022-12-05 00:16:08 +00:00
Ryan Chandler
27b9f7bb1d
fix: skip comments after an array items trailing comma 2022-12-05 00:14:19 +00:00
Ryan Chandler
a2d591938c
chore: DocStringIndentationType -> DocStringIndentationKind 2022-12-05 00:09:59 +00:00
Ryan Chandler
de2bf3eb6a
chore: clippy changes 2022-12-05 00:09:23 +00:00
Ryan Chandler
eb04872279
lexer&parser: full heredoc/nowdoc support (#154) 2022-12-05 00:04:09 +00:00
Saif Eddin Gmati
b6c145f98e
fix: attributes support (#155)
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 16:12:23 +01:00
Saif Eddin Gmati
75110ff0dc
fix: formatting (#153) 2022-12-04 14:09:46 +01:00
Ryan Chandler
ce29038f2d
fix: allow using null as top level function name 2022-12-04 09:59:28 +00:00
Ryan Chandler
0d9e7ae40c
wip 2022-12-04 09:53:39 +00:00
Ryan Chandler
63446c2b45
parser: support basic heredocs 2022-12-04 09:53:39 +00:00
Ryan Chandler
79a9b07b3c
refactor: abstract string part parsing 2022-12-04 09:53:39 +00:00
Ryan Chandler
6e13626ac7
wip 2022-12-04 09:53:38 +00:00
Saif Eddin Gmati
4904a84a62
fix: parse sum types correctly (#151) 2022-12-04 09:53:18 +00:00
Saif Eddin Gmati
a6e86e452a
fix: make sure unbraced namespaces don't get nested (#149) 2022-12-04 09:12:19 +00:00
Saif Eddin Gmati
5c92f7fff6 fix: support scoped types 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
496d25eb69 fix: don't allow multiple default arms for match expression 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
626e3ff28b fix: multiple issues regarding optional comma 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
6c27fc8599 fix: use by reference in anonymous functions (#10) 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
848da45855 fix: require comma between parameters 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
e3146c2066 fix: make sure that properties have the correct type 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
974c04db85 fix: namespace parser
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
1f4875c802 fix: properties parser
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
c098715da6 fix: enum parser
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
4299fa7221 feat: add parser state scope 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
77ff227bc0 feat: make parser, and lexer immutable 2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
bdef34b4b4 chore: don't use class member flags for interface member flags
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 08:56:53 +00:00
Saif Eddin Gmati
ac42958b4f chore: refactor project structure
- added `prelude`
- moved `ast` to `parser`
- moved `Lexer` from `crate::lexer::lexer::Lexer` to `crate::lexer::Lexer`
- renamed `LexerError` to `SyntaxError`
- moved `SyntaxError` to `token::error`
- implemented `Display` for `SyntaxError`
- add `tokens.txt` to integration tests
- removed all unit tests for `Lexer` ( everything is tested in integration tests )
- improved syntax error assertations
2022-12-04 08:56:53 +00:00