-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[AssetMapper] Detect import with a sequence parser #59004
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
This comment has been minimized.
This comment has been minimized.
Dear Carson.... you're doing a bad ChatGpt impression right now 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this. This looks good to me overall, but my review was very very quick and I didn't compared with mainstream JS parsers so I may have missed things.
src/Symfony/Component/AssetMapper/Compiler/Parser/JavascriptParser.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/AssetMapper/Compiler/Parser/JavascriptParser.php
Outdated
Show resolved
Hide resolved
No worry.. and thank you for taking the time :) My main question is currently: how internal can/should we make this ? Maintaining for AssetMapper is already something, but probably not something we want to publish with BC promise, documentation, etc? (will address your feedback later tonight!) |
I would make it entirely internal |
src/Symfony/Component/AssetMapper/Compiler/Parser/CodeSequence.php
Outdated
Show resolved
Hide resolved
a17a895
to
b061eca
Compare
@dunglas @OskarStark if we use it only in this specific use case, we don't need the value object, because we don't need to keep the previously matched sequences. That's why i simplified the code here to focus only on the current sequence. |
1df8c8b
to
720c387
Compare
Thank you @smnandre. |
@smnandre thank you! |
Third attempt after #54134 and #58999.. this is the good one 👍
I initially started this PR to learn / try things, but it really behaves well.. and may stop (or help stopping) what seems to be a never-ending suite of special cases.
Open to any feedback