Commit Graph

95 Commits (1ce40146b7294d257414ca4a3a6a834c0385d3e5)

Author SHA1 Message Date
Hugo Thunnissen a93f645216 Implement parsing of string concatenation tokens 4 weeks ago
Hugo Thunnissen e020bb4e05 Add testcase for derived statement starting with function + fix bug
- Derived statements starting with functions were not resolved to a type. This
was caused by bugs in `phpinspect--get-derived-statement-type-in-block' and
`phpinspect--interpret-expression-type-in-block'. The division in each
function's functionalities was blurry and both duplicated some of each other's
logic. The situation has now been cleaned up a bit.
- An extra testcase was added for derived statements starting with a function
call
- a bunch of code that broke because of the changes was fixed
4 weeks ago
Hugo Thunnissen 1ab4a3b1f5 Explicitly test and implement the resolving of function call return types 4 weeks ago
Hugo Thunnissen f7fdac911b Make import sort function customizable + only sort when necessary 4 weeks ago
Hugo Thunnissen e111df4ca9 Completion: filter out attributes that are not accessible from the current scope 1 month ago
Hugo Thunnissen 25ae878cfc Implement indexation of functions nested within blocks/lists
- This fixes a bug that caused laravel helper functions not to be indexed,
unless you were to open them in a buffer (the way in which live buffers are
indexed is more sophisticated and it already indexed these functions).
1 month ago
Hugo Thunnissen 7eed1d57e9 Fix a bug in the incremental parsing of function tokens
Incrementally parsed functions would lose their blocks because of a faulty if
statement that was leftover from before the function body parser was added.
1 month ago
Hugo Thunnissen 855529095a Index types used in class property initializers and combine change calls for fix-imports 1 month ago
Hugo Thunnissen d7704c9d7c Add test for incremental parser accuracy and fix some gnarly parser bugs 1 month ago
Hugo Thunnissen 4793b78ad5 Detect use of type for casting and try/catch exception types 1 month ago
Hugo Thunnissen b01d5dfbc3 Add tests for aliased imports + fix bugs 1 month ago
Hugo Thunnissen 33922a6ff2 Implement parsing and indexation of @throws annotations 1 month ago
Hugo Thunnissen 6f1e11c32a Implement indexation and resolving of @param annotation types 1 month ago
Hugo Thunnissen 5c61d4b293 Implement resolving types from typecasted statements 1 month ago
Hugo Thunnissen 8a96383407 Implement resolving variable types through inline @var annotations 1 month ago
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 be2f8dada5 Add test for phpinspect-fix-imports 1 month ago
Hugo Thunnissen 5032ae74ff Resolve types of expressions nested in list tokens
- Resolve "(new Foo())->bar"
- Resolve "if ($foo = new Bar()) { $foo->baz"
1 month ago
Hugo Thunnissen 14c63e4187 Improve method return-type test 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 3a0ce3ac2d Fix another infinite recursion bug
Bug occured in scenario's where array-members were self-referentially assigned
in a foreach loop.

like so:

foreach($things as $thing) {
  $thing = $this->something;
}
1 month ago
Hugo Thunnissen 2d93ec7f79 Fix infinite recursion bug in `phpinspect--get-pattern-type-in-block' 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 f2f1ac9b84 Add property types and anonymous function argument types to used-types index 1 month ago
Hugo Thunnissen 3fff772d8a Fix phpinspect-buffer-index-functions test 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 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 712268e4ec Fix bug in autoloader that caused registration of only one FQN per type
ci/woodpecker/push/woodpecker Pipeline failed Details
6 months ago
Hugo Thunnissen ea133c2044 Fix bug in `phpinspect-splayt-find-all-between' that impacted import indexation
ci/woodpecker/push/woodpecker Pipeline failed Details
6 months ago
Hugo Thunnissen 7f2baf2c68 Make phpinspect--match-sequence return nil unless entire sequence matches
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 6b832b521b Prefix unused lexical variable in test with _
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 3e28231d03 Remove unnecessary macros + use `let' to set PLACE in iterative macros 1 year ago
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
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 20ec37481a Fix compilation of benchmarks and tests
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen a99f73b83d Use rear pointer instead of nconc to append to end of list
ci/woodpecker/push/woodpecker Pipeline failed Details
1 year ago
Hugo Thunnissen 8cfc48348f Run relint and fix detected regexp issues
ci/woodpecker/push/woodpecker Pipeline failed Details
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 68c826243c Keep index synchronized with buffer state 1 year ago
Hugo Thunnissen 04606a4756 Fix test
ci/woodpecker/push/woodpecker Pipeline failed Details
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 d86ef5756b Remove `phpinspect-define-pipeline-step' in favor of direct fun call 1 year ago
Hugo Thunnissen f5cc681105 Fix let parenthesis in test-buffer.el 1 year ago
Hugo Thunnissen d51137e58e Remove faulty edit tracker code based on wrong deduction 1 year ago