Commit Graph

35 Commits (master)

Author SHA1 Message Date
Hugo Thunnissen 81919175ca Implement stub index for builtin functions and types
Misc:
- Removed Cask in favor of dependency install script
- Rework makefile to provide simple build/install process
9 months 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
9 months ago
Hugo Thunnissen 20ec37481a Fix compilation of benchmarks and tests
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 8cfc48348f Run relint and fix detected regexp issues
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months 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
9 months ago
Hugo Thunnissen 84ddaf1dc2 Fix all byte compilation warnings and errors (for real this time (probably))
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 68c826243c Keep index synchronized with buffer state 9 months ago
Hugo Thunnissen 135263c533 Add tests for incremental parsing + fix parser bugs that came to light 10 months ago
Hugo Thunnissen b68baaec83 Make parse context cancellable and restore state after interrupt 10 months ago
Hugo Thunnissen e270729e14 Implement splay tree for overlay storage/lookup
ci/woodpecker/push/woodpecker Pipeline was successful Details
This makes repeated overlay lookups during incremental parsing or buffer
analysis more efficient.
10 months ago
Hugo Thunnissen bb04e9a0f8 Implement strategy pattern for phpinspect-eldoc-function 10 months ago
Hugo Thunnissen ad5ede01ad Implement Incremental Parsing
ci/woodpecker/push/woodpecker Pipeline was successful Details
10 months ago
Hugo Thunnissen 47335f3450 Refactor phpinspect--project to phpinspect-project
ci/woodpecker/push/woodpecker Pipeline was successful Details
11 months ago
Hugo Thunnissen 9882ed2c60 Test/fix type inference of objects in nested arrays
continuous-integration/drone/push Build was killed Details
1 year ago
Hugo Thunnissen f030a685d2 Alter interpret-expression-type to interpret array-member assignment
continuous-integration/drone/push Build was killed Details
interpret-expression-type now interprets assignment values provided through
array access as derived statements. This makes type inference work for cases
like `[$foo[0]]`, where it did not before.
1 year ago
Hugo Thunnissen 0c0c1ca381 Add test for phpinspect-get-pattern-type-in-block
continuous-integration/drone/push Build was killed Details
1 year ago
Hugo Thunnissen 224bbd7916 Implement array member type inference
phpinspect now understands typed arrays!
1 year ago
Hugo Thunnissen 1b1cf45638 Fix bug in extended classes' method merging + add some tests
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 ef9a7336cf Replace virtual-directory with more general virtual-fs implementation 2 years ago
Hugo Thunnissen 153ff71fcf WIP: Implement psr0 and psr4 autoload strategies
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo Thunnissen 43ab1bd99b Make sure that the worker is running during tests
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing 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 0bc9e795b2 Fix tests and patch bugs that came to light in the process 2 years ago
Hugo Thunnissen 2b85271b2b Test + fix get-last-statement-in-token for static attribute references 3 years ago
Hugo Thunnissen 8caf967b57 Add test for resolve-type-from-context with preceding bareword 3 years ago
Hugo Thunnissen 6b8db3a318 Test and fix eldoc function for static methods
Add tests for
- phpinspect-eldoc-function in the context of static attribute and object attribute references
- phpinspect-resolve-type-from-context in the context of static attribute references

Fix:
- phpinspect-get-derived-statement-type-in-block
3 years ago
Hugo Thunnissen f5fe299c01 Make functions that access the filesystem configurable and add test
Add test for `phpinspect-resolve-type-from-context'
3 years ago
Hugo Thunnissen a6bb09b2b3 Test and fix static function indexation 3 years ago
Hugo Thunnissen faa936a4f0 Test type-resolver + make type resolving work for "blocked" namespaces
Test type-resolver created from resolvecontext with:
 - File containing single namespace and no block
 - File containing one namespace with a block ('{}')
 - File containing multiple namespaces with blocks

Patch `phpinspect--make-type-resolver-for-resolvecontext' to support namespaces with
blocks.
3 years ago
Hugo Thunnissen 098146bfc5 Add resolvecontext structure and optimze type resolving process
The resolvecontext will from now on be used as store for all data required to resolve the
return type of a statement at any given point.

`phpinspect--word-end-regex` has been altered to match words that are directly followed by
other, "non-word" characters.

`phpinspect-describe-handler` has been added to list and describe handlers during runtime.

A bug has been fixed that made the parser interpret the "static" keyword inside functions
as a class attribute in stead of just a word.

Aside from the company backend, `phpinspect-eldoc-function` has been simplified and
adapted to make use of the resolvecontext structure.

The resolving of statment/variable types has been altered to make use of imperative loops
in a couple of places for the sake of simplicity and optimization.
3 years ago
Hugo Thunnissen e8f486f095 Improve codestyle and documentation + add tests for indexation
This commit contains one logic change: Changed add-to-list usage to cl-pushnew in
phpinspect-merge-indexes implementation for classes. The resulting function output should
be the same.
3 years ago
Hugo Thunnissen 811a9a9141 Add more tests for the parser code 3 years ago
Hugo Thunnissen f7d88a90f4 Implement some general tests for the parser code 3 years ago