mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-26 20:04:48 +01:00
Fix a number of other typos
This commit is contained in:
parent
99e44eb8e1
commit
523e024ba0
@ -15,7 +15,7 @@ Create a `composer.json` file in your project root and use it to define your dep
|
||||
|
||||
{
|
||||
"require": {
|
||||
"nikic/php-parser": "1.0-dev"
|
||||
"nikic/php-parser": "1.0.*@dev"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ in the above example you would write `$stmts[0]->exprs`. If you wanted to access
|
||||
call, you would write `$stmts[0]->exprs[1]->name`.
|
||||
|
||||
All nodes also define a `getType()` method that returns the node type. The type is the class name
|
||||
without the `PHPParser\Node\` prefix and `\` replaced with `_`. It also does not contain a trailing
|
||||
without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not contain a trailing
|
||||
`_` for reserved-keyword class names.
|
||||
|
||||
It is possible to associate custom metadata with a node using the `setAttribute()` method. This data
|
||||
|
@ -26,7 +26,7 @@ abstract class BuilderAbstract implements Builder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a name: Converts plain string names to PHPParser_Node_Name.
|
||||
* Normalizes a name: Converts plain string names to PhpParser\Node\Name.
|
||||
*
|
||||
* @param Name|string $name The name to normalize
|
||||
*
|
||||
|
@ -16,7 +16,7 @@ class Lexer
|
||||
* Creates a Lexer.
|
||||
*/
|
||||
public function __construct() {
|
||||
// map from internal tokens to PHPParser tokens
|
||||
// map from internal tokens to PhpParser tokens
|
||||
$this->tokenMap = $this->createTokenMap();
|
||||
|
||||
// map of tokens to drop while lexing (the map is only used for isset lookup,
|
||||
|
@ -65,7 +65,7 @@ if ('Symfony' === $TEST_TYPE) {
|
||||
showHelp('Test type must be either "Symfony" or "PHP"!');
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/../lib/PHPParser/Autoloader.php';
|
||||
require_once dirname(__FILE__) . '/../lib/PhpParser/Autoloader.php';
|
||||
PhpParser\Autoloader::register();
|
||||
|
||||
$parser = new PhpParser\Parser(new PhpParser\Lexer\Emulative);
|
||||
|
Loading…
Reference in New Issue
Block a user