Ryan Chandler
435a3aa12b
chore: temporarily skip some stuff
2022-12-05 13:39:59 +00:00
azjezz
7ab417c801
fix: formatting
...
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 13:37: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
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
f65d8eefc0
chore: add laravel framework as third party test
2022-12-05 00:18:20 +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
Ryan Chandler
ce29038f2d
fix: allow using null as top level function name
2022-12-04 09:59:28 +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
Saif Eddin Gmati
22dd9db6e7
chore: don't allow reserved keywords to stand for function name ( #146 )
...
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-11-30 22:51:52 +00:00
Saif Eddin Gmati
903ccc5666
chore: refactor classish parsers ( #141 )
2022-11-30 14:38:07 +00:00
Ryan Chandler
a069fa2a8a
chore: move all parser tests into code files ( #139 )
2022-11-30 00:43:37 +00:00
Saif Eddin Gmati
3df5a46eeb
chore: test against third party libraries ( #138 )
2022-11-30 00:17:34 +00:00
Saif Eddin Gmati
558ce71563
feat: add test generator ( #134 )
...
Co-authored-by: Ryan Chandler <ryangjchandler@gmail.com>
closes https://github.com/ryangjchandler/php-parser-rs/issues/130
2022-11-29 23:19:51 +00:00
Saif Eddin Gmati
0e04f157f7
chore: consistent naming ( #135 )
...
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-11-29 21:25:17 +00:00
Saif Eddin Gmati
017b2e19c3
chore: use new integration test runner instead of assert_ast() ( #127 )
...
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-11-29 01:33:01 +00:00
Saif Eddin Gmati
adac1d7171
chore: better parser errors ( #126 )
2022-11-29 00:46:05 +00:00
Ryan Chandler
3a618d2a9e
chore: disable doc tests
2022-07-19 14:43:25 +01:00
Ryan Chandler
25bda5af6f
lexer: rough state machine for lexing inline and scripting tokens
2022-07-16 14:14:03 +01:00