-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve expressions recursively (#155)
* Add Definition class * Add recursive DefinitionResolver * Cache hover
- Loading branch information
1 parent
c19aedc
commit 33211c6
Showing
20 changed files
with
1,061 additions
and
465 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace LanguageServer; | ||
|
||
use PhpParser\Node; | ||
use phpDocumentor\Reflection\{Types, Type, Fqsen, TypeResolver}; | ||
use LanguageServer\Protocol\SymbolInformation; | ||
use Exception; | ||
|
||
/** | ||
* Class used to represent symbols | ||
*/ | ||
class Definition | ||
{ | ||
/** | ||
* The fully qualified name of the symbol, if it has one | ||
* | ||
* Examples of FQNs: | ||
* - testFunction() | ||
* - TestNamespace\TestClass | ||
* - TestNamespace\TestClass::TEST_CONSTANT | ||
* - TestNamespace\TestClass::staticTestProperty | ||
* - TestNamespace\TestClass::testProperty | ||
* - TestNamespace\TestClass::staticTestMethod() | ||
* - TestNamespace\TestClass::testMethod() | ||
* | ||
* @var string|null | ||
*/ | ||
public $fqn; | ||
|
||
/** | ||
* @var Protocol\SymbolInformation | ||
*/ | ||
public $symbolInformation; | ||
|
||
/** | ||
* The type a reference to this symbol will resolve to. | ||
* For properties and constants, this is the type of the property/constant. | ||
* For functions and methods, this is the return type. | ||
* For any other declaration it will be null. | ||
* Can also be a compound type. | ||
* If it is unknown, will be Types\Mixed. | ||
* | ||
* @var \phpDocumentor\Type|null | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* The first line of the declaration, for use in textDocument/hover | ||
* | ||
* @var string | ||
*/ | ||
public $declarationLine; | ||
|
||
/** | ||
* A documentation string, for use in textDocument/hover | ||
* | ||
* @var string | ||
*/ | ||
public $documentation; | ||
} |
Oops, something went wrong.