Commit Graph

43 Commits (e0f494feb40de76b1051d57b1599768bac152333)

Author SHA1 Message Date
Hugo Thunnissen 8734c9418d Test + improve `phpinspect-fix-imports' (and parse enums as classes)
- `phpinspect-fix-imports' now sorts the imports alphabetically
- `phpinspect-fix-imports' removes excess trailing newlines
- "enum" keywords are now regarded like "class" keywords. (enum cases not yet
   supported)
- Namespaces were added to token index
1 month ago
Hugo Thunnissen 58ef5e3599 Refactor use of project root to project obj injection + test and fix some bugs
- Test/Fix indexation of method return types
- Get rid of some technical debt (use of project-root and global variables)
- Cleanup/refactor tests
1 month ago
Hugo Thunnissen 4ec4c40c9d Add eldoc for sigil variables and allow display of multiple eldoc results
By allowing multiple eldoc results, displaying variable information doesn't
interfere with function parameter hints.
1 month ago
Hugo Thunnissen 2e064d52e1 Implement containing type inference for collection-like class properties 1 month ago
Hugo Thunnissen 93b815d71a Index used traits (juste use of type, no actual functionality outside of that) 1 month ago
Hugo Thunnissen 130e2c06c5 Index types used in arrays 1 month ago
Hugo Thunnissen f1dc699560 Detect types used with "instanceoff" 1 month ago
Hugo Thunnissen 6a175c9e44 Update a few doc strings in phpinspect-index.el 1 month ago
Hugo Thunnissen f2f1ac9b84 Add property types and anonymous function argument types to used-types index 1 month ago
Hugo Thunnissen 2520c89680 Account for tokens after @method annotation when indexing
- Add :rest keyword to  `phpinspect--match-sequence'
- Use :rest keyword in  `phpinspect--index-method-annotations'
1 month ago
Hugo Thunnissen 3887bc58d4 Implement indexation of readonly variables + allow invalid keywords
readonly variables no longer result in a failed indexation.

When we fail matching the scope keywords + variable patterns, only the variable
name is indexed instead of throwing an error.
1 month ago
Hugo Thunnissen dfdef3e382 Implement support for PHP8.1 property typehints 2 months ago
Hugo Thunnissen 2aac7a273e Support @method annotations for static methods 2 months ago
Hugo Thunnissen 42c7bd2715 Handle unsupported annotation styles gracefully
ci/woodpecker/push/woodpecker Pipeline failed Details
6 months ago
Hugo Thunnissen d3eec5c0bd Temporary fix for error upon indexation of anonymous functions 1 year ago
Hugo Thunnissen b82c786346 Fix native compilation warnings
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 2d29bce498 Apply overall code quality improvements
ci/woodpecker/push/woodpecker Pipeline failed Details
Even benchmarks and tests now compile without warnings or errors :)

This includes patches from Stefan Monnier:
- https://lists.gnu.org/archive/html/emacs-devel/2023-08/msg00548.html
1 year ago
Hugo Thunnissen ad4b1f25a6 Update copyright statements and apply some code style improvements
ci/woodpecker/push/woodpecker Pipeline failed Details
As suggested by Stefan Monniers patch:
 - https://mail.gnu.org/archive/html/emacs-devel/2023-08/msg00367.html
1 year ago
Hugo Thunnissen 84ddaf1dc2 Fix all byte compilation warnings and errors (for real this time (probably))
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 2ff9919e44 Add debug statements + use condition-case-unless-debug for token indexation 1 year ago
Hugo Thunnissen 68c826243c Keep index synchronized with buffer state 1 year ago
Hugo Thunnissen e35caa7e15 Fix a variety of bugs
ci/woodpecker/push/woodpecker Pipeline failed Details
- phpinspect--index-tokens no longer errors upon unexpected return annotation
values
- phpinspect-fixt-imports now also fixes imports outside of classes
- Functions are no longer included in statements when deriving types
1 year ago
Hugo Thunnissen 55413ea9fb Implement basic support for function indexation and include dirs
ci/woodpecker/push/woodpecker Pipeline failed Details
Does not yet include support for imported namespaced functions
1 year ago
Hugo Thunnissen 05ca0ace20 Fix all remaining byte compiler warnings
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 9f7931a7b6 Rework parser for ahead of time byte compilation
ci/woodpecker/push/woodpecker Pipeline failed Details
This commit does away with the JIT approach that byte compiles parser functions
on the go. Some workarounds have been implemented to inline handler functions
while still allowing them to call the parser functions they are used in.
1 year ago
Hugo Thunnissen c35c00ceff Implement strategy pattern for completion backend
ci/woodpecker/push/woodpecker Pipeline was successful Details
1 year ago
Hugo Thunnissen d1d34a4249 Move more functionalities from main file to separate modules 1 year ago
Hugo Thunnissen 7f76ba4c11 Fix some bugs introduced by the incremental parsing feature
ci/woodpecker/push/woodpecker Pipeline was successful Details
Among other things:

- use-keyword parser handler result being registered for two positions due to
wrong use of "root" parser parameter.
- phpinspect-fix-imports was broken
1 year ago
Hugo Thunnissen ad5ede01ad Implement Incremental Parsing
ci/woodpecker/push/woodpecker Pipeline was successful Details
1 year ago
Hugo Thunnissen f9f3440850 Make file contents insertion asynchronous in background threads
ci/woodpecker/push/woodpecker Pipeline was successful Details
This allows for a more lenient pausing regime in the worker thread, as file
content insertion, which is the longest running action while indexing, no longer
makes the main thread wait.

Implementation uses host system's cat program, but defers to
insert-file-contents when this is not available.
1 year ago
Hugo Thunnissen 47335f3450 Refactor phpinspect--project to phpinspect-project
ci/woodpecker/push/woodpecker Pipeline was successful Details
1 year ago
Hugo Thunnissen 224bbd7916 Implement array member type inference
phpinspect now understands typed arrays!
2 years ago
Hugo Thunnissen 97377c2922 Fix bugs in phpinspect-fix-imports
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo Thunnissen e65b268cea Implement @method annotation indexation
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo Thunnissen dbf0ec0390 Transition from index script to autoloader
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo Thunnissen 56eaa3b36d Replace index-thread with more generic and encapsulated worker type
continuous-integration/drone/push Build is failing Details
The new implementaiton makes the background thread more extensible in terms of
the types of tasks that it can execute. It also allows for the injection of a
worker as dependency of project instances, which will make automated testing
easier in the future.
2 years ago
Hugo Thunnissen 1816495538 Use thread-live-p in stead of thread-alive-p for emacs 28.1 support
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo Thunnissen 0bc9e795b2 Fix tests and patch bugs that came to light in the process 2 years ago
Hugo Thunnissen c0786db131 WIP: Index every possibly required type ahead of time.
- Changed project and after-save-action implementation to include imports in
  opened files. This way any types that are used in a file will have completion
  available for it ahead of time.
- Extra attributes have been added to phpinspect--class to check whether or not
  its file has been indexed/is queued for indexation yet.
- Misc: Fixed eldoc function bug that was caused by a previous commit
2 years ago
Hugo Thunnissen a2ce841555 WIP: Make index thread block/wakeup when queue is empty/populated 2 years ago
Hugo Thunnissen 341afd42da WIP: Index types in the background using collaborative threading.
Created queue for types to be indexed in separate thread and tried to limit
lock-ups as much as possible by using idle timers.
2 years ago
Hugo Thunnissen f013b3c709 WIP: Support ambiguous typehints
- Try to infer type of "object" typehint by using the return annotation
- Support late static binding with "static" and "this" return type
2 years ago
Hugo Thunnissen e07e1ed9e6 WIP: Split code up into separate files 2 years ago