Skip to content

Conversation

dantleech
Copy link
Contributor

@dantleech dantleech commented Nov 12, 2022

Currently the parser interprets the "node" at the offset indicated by <> below as a SourceFileNode (or CompoundStatementNode):

$container->get('foo<>

This is because the token is a T_ENCAPSED_WHITESPACE token.

I would expect this to be a StringLiteral.

This PR changes the behavior to return a StringLiteral in this case.


I've made this a draft as not entirely sure if this is the correct behavior (I think it is) or if there are other places for it to be fixed. In the meantime I will be using a fork with Phpactor.

dantleech added a commit to phpactor/tolerant-php-parser that referenced this pull request Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant