-
Couldn't load subscription status.
- Fork 0
Add support for #-style comments #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Comments are not retained inside the emitted code, so this may become a source of confusion if people use XP-style annotations (e.g. Handling this could be done by:
|
Easiest way for the beginning See #77 (comment)
TODO: `@$param: annotation` is not yet supported
Instead, seperate annotations and target annotations inside signature / parameter parsing
PerformanceBefore: $ XP_RT=7.4 xp test src/test/php/
# ...
♥: 577/577 run (0 skipped), 577 succeeded, 0 failed
Memory used: 7818.67 kB (7876.94 kB peak)
Time taken: 0.226 secondsAfter: $ XP_RT=7.4 xp test src/test/php/
# ...
♥: 592/592 run (0 skipped), 592 succeeded, 0 failed
Memory used: 7965.44 kB (8023.70 kB peak)
Time taken: 0.228 secondsCodeBefore: $ cloc-1.82.pl src/main/
51 text files.
51 unique files.
10 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.20 s (251.3 files/s, 22685.6 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
PHP 50 536 684 3293
-------------------------------------------------------------------------------
SUM: 50 536 684 3293
-------------------------------------------------------------------------------After: $ cloc-1.82.pl src/main/
51 text files.
51 unique files.
10 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.23 s (214.1 files/s, 19483.2 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
PHP 50 540 684 3327
-------------------------------------------------------------------------------
SUM: 50 540 684 3327
-------------------------------------------------------------------------------...a difference of +34 lines |
|
Handling the key/value pair syntax requires an additional 27 lines of code, and a bit of look-ahead magic. Once xp-framework/rfc#335 is fully implemented, this can be removed. |
Before, these yielded a syntax error.