-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kint_SourceParser: Less scary preg_match, more proper parsing
Why such a complicated solution to a fixed problem? The previous preg_match based option had some big bugs. For example, if a query was called through call_user_func_array() the preg match wouldn't match it and would instead grab the first call to that method *before* the call, even if it was thousands of lines earlier. The more robust parsing also allows us to more correctly guess which function call is the one in question on a line by counting the number of parameters it was called with. Lastly, this allows us to provide access paths even when we don't know what the parameter is called. Currently the arguments will be numeric (Since they won't be mistaken for a real variable) and start from $0 and go up. Like most nice things, there's a performance penalty for this, but since it's only run once per call it's not exponential like changes to the parser and its plugins. The tiny extra overhead per call is absolutely worth it
- Loading branch information
Showing
5 changed files
with
1,018 additions
and
205 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.