Impl. `ReflectionFunctionAbstract::getStartColumn` (and getEndColumn)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Currently only line can be obtained by reflection.
AFAK this limitation is comming from AST as only line and no column is stored to save memory.
I cannot tell if storing file column is worth now/in 2023 for every AST node, but I would welcome the column number to be stored for classes and functions to get able to get the column number via reflection and locate the source code more precisely.
In our usecase, we use the reflection data to highlight a Closure in a file and with short closures, more than one Closure can be present on 1 line with actual PSR-12 style, ie. currently a Closure instance cannot be mapped to a code section.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names ReflectionFunctionAbstract::getStartColumn and getEndColumn and notes that AST nodes currently store lines but not columns. Start by tracing the reflection metadata and AST location representation; no files or tests are identified. Done means reflection can distinguish multiple closures on one line with accurate start and end columns, with the memory impact addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100