Started reworking expression strings into Expression objects#307
Merged
Started reworking expression strings into Expression objects#307
Conversation
Member
Author
|
As part of checking whether everything works as expected I am adding This is a major issue, and more work is needed to a) parse the whole FQSEN and use that Another test is needed to see if it resolves relative references as |
d39c047 to
d74bc26
Compare
d74bc26 to
2675d07
Compare
2675d07 to
c103f64
Compare
Values of constants, named arguments, etc, should be parsed to include types and FQSENs that can be used in phpDocumentor to display links with. Since these are now simple strings, I have refactored this into a template string system with placeholder values that a consumer could replace with its own values.
The conversion from PHP-Parser's node to an Expression needs to take into account whether the provided parser is an Expression parser or the usual Standard parser. If it is an ExpressionParser, we can create a real Expression out of it
As part of checking whether everything works as expected I am adding integration tests, and find out that the pretty printer can be a bit greedy. This is exemplified in the ConstructorPromotionTest where I want to pass a reference to a local class constant, but the ExpressionPrinter picks up on the class reference and does not resolve it. This is a major issue, and more work is needed to a) parse the whole FQSEN and use that b) find out how to resolve references, such as self Another test is needed to see if it resolves relative references as well, as the Standard PrettyPrinter code gives me the idea it does not.
c103f64 to
56b5d92
Compare
131c6ee to
b02fece
Compare
b02fece to
113afc2
Compare
113afc2 to
88113ca
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Values of constants, named arguments, etc, should be parsed to include types and FQSENs that can be used in phpDocumentor to display links with. Since these are now simple strings, I have refactored this into a template string system with placeholder values that a consumer could replace with its own values.
TODO: