Home
last modified time | relevance | path

Searched refs:to (Results 1 – 25 of 62) sorted by relevance

123

/PHP-Parser/test/code/parser/errorHandling/
H A DlexerErrors.test9 Unterminated comment from 4:1 to 5:9
36 Unexpected character "" (ASCII 1) from 4:1 to 4:1
67 Unexpected null byte from 4:1 to 4:1
100 Unexpected character "" (ASCII 1) from 4:1 to 4:1
101 Unexpected character "" (ASCII 2) from 6:1 to 6:1
142 Unterminated comment from 5:5 to 6:2
143 Syntax error, unexpected EOF from 6:2 to 6:2
H A Drecovery.test9 Syntax error, unexpected T_STRING from 4:1 to 4:3
10 Syntax error, unexpected T_STRING from 5:1 to 5:3
11 Syntax error, unexpected EOF from 5:6 to 5:6
48 Syntax error, unexpected T_STRING from 4:1 to 4:3
120 Syntax error, unexpected ';' from 3:5 to 3:5
141 Syntax error, unexpected '}' from 4:1 to 4:1
214 Syntax error, unexpected ')' from 4:8 to 4:8
266 Syntax error, unexpected EOF from 8:12 to 8:12
321 Syntax error, unexpected EOF from 2:6 to 2:6
338 Syntax error, unexpected EOF from 2:4 to 2:4
[all …]
H A DeofError.test5 Syntax error, unexpected EOF from 1:10 to 1:10
18 Syntax error, unexpected EOF from 1:20 to 1:20
/PHP-Parser/test/code/parser/scalar/
H A DflexibleDocStringErrors.test40 Invalid indentation - tabs and spaces cannot be mixed from 4:1 to 4:3
41 Invalid indentation - tabs and spaces cannot be mixed from 8:1 to 8:3
42 Invalid indentation - tabs and spaces cannot be mixed from 10:6 to 12:5
43 Invalid body indentation level (expecting an indentation level of at least 5) from 14:6 to 18:8
44 Invalid body indentation level (expecting an indentation level of at least 1) from 20:1 to 22:4
45 Invalid body indentation level (expecting an indentation level of at least 2) from 25:1 to 26:0
46 Invalid body indentation level (expecting an indentation level of at least 1) from 30:1 to 30:4
47 Invalid body indentation level (expecting an indentation level of at least 1) from 34:1 to 35:0
H A DnumberSeparators.test24 Syntax error, unexpected T_STRING from 13:4 to 13:4
25 Syntax error, unexpected T_STRING from 14:2 to 14:4
26 Syntax error, unexpected T_STRING from 15:2 to 15:2
27 Syntax error, unexpected T_STRING from 16:3 to 16:4
28 Syntax error, unexpected T_STRING from 17:2 to 17:6
29 Syntax error, unexpected T_STRING from 18:2 to 18:6
30 Syntax error, unexpected T_STRING from 19:2 to 19:4
31 Syntax error, unexpected T_STRING from 20:2 to 20:4
/PHP-Parser/test/code/parser/stmt/class/
H A Dname.test5 Cannot use 'self' as class name as it is reserved from 1:13 to 1:16
24 Cannot use 'PARENT' as class name as it is reserved from 1:13 to 1:18
43 Syntax error, unexpected T_STATIC, expecting T_STRING from 1:13 to 1:18
53 Cannot use 'self' as class name as it is reserved from 1:23 to 1:26
74 Cannot use 'PARENT' as class name as it is reserved from 1:23 to 1:28
95 Cannot use 'static' as class name as it is reserved from 1:23 to 1:28
116 Cannot use 'self' as interface name as it is reserved from 1:26 to 1:29
182 Cannot use 'self' as class name as it is reserved from 1:17 to 1:20
199 Cannot use 'PARENT' as class name as it is reserved from 1:17 to 1:22
216 Syntax error, unexpected T_STATIC, expecting T_STRING from 1:17 to 1:22
[all …]
H A Dmodifier_error.test5 Multiple access type modifiers are not allowed from 1:24 to 1:29
40 Multiple access type modifiers are not allowed from 1:24 to 1:32
75 Multiple readonly modifiers are not allowed from 1:26 to 1:33
110 Multiple abstract modifiers are not allowed from 1:26 to 1:33
142 Multiple static modifiers are not allowed from 1:24 to 1:29
177 Multiple final modifiers are not allowed from 1:23 to 1:27
210 Cannot use the final modifier on an abstract class member from 1:26 to 1:30
242 Cannot use the final modifier on an abstract class from 1:16 to 1:20
H A DstaticMethod.test5 Constructor __construct() cannot be static from 1:17 to 1:22
38 Destructor __destruct() cannot be static from 1:17 to 1:22
71 Clone method __clone() cannot be static from 1:17 to 1:22
104 Constructor __CONSTRUCT() cannot be static from 1:17 to 1:22
137 Destructor __Destruct() cannot be static from 1:17 to 1:22
170 Clone method __cLoNe() cannot be static from 1:17 to 1:22
/PHP-Parser/
H A DUPGRADE-2.0.md1 Upgrading from PHP-Parser 1.x to 2.0
6 PHP-Parser now requires PHP 5.4 or newer to run. It is however still possible to *parse* PHP 5.2 and
28 The first argument to `ParserFactory` determines how different PHP versions are handled. The
31 …* `ParserFactory::PREFER_PHP7`: Try to parse code as PHP 7. If this fails, try to parse it as PHP …
32 …* `ParserFactory::PREFER_PHP5`: Try to parse code as PHP 5. If this fails, try to parse it as PHP …
40 To use a custom lexer, pass it as the second argument to the `create()` method:
52 described above to create your parser instance, these changes should have no further impact on you.
57 classes, as well as the classes that had to be renamed for PHP 7 support.
66 * The `NodeTraverser` no longer clones nodes by default. If you want to restore the old behavior,
67 pass `true` to the constructor.
[all …]
H A DUPGRADE-3.0.md1 Upgrading from PHP-Parser 2.x to 3.0
6 * The specific details of the node representation have changed in some cases, primarily to
14 PHP-Parser now requires PHP 5.5 or newer to run. It is however still possible to *parse* PHP 5.2,
17 ### Changes to the node structure
30 The following changes are unlikely to require code changes:
32 * The `ClassConst` constructor changed to accept an additional `flags` subnode.
39 ### Changes to error recovery mode
85 It is possible to restore the precise previous behavior with the following code:
109 to optionally accept an `ErrorHandler`:
118 If you use a custom lexer with overridden `startLexing()` method, it needs to be changed to accept
[all …]
H A DUPGRADE-1.0.md1 Upgrading from PHP-Parser 0.9 to 1.0
6 PHP-Parser now requires PHP 5.3 or newer to run. It is however still possible to *parse* PHP 5.2 so…
9 ### Move to namespaced names
11 The library has been moved to use namespaces with the `PhpParser` vendor prefix. However, the old n…
29 Note that the `PHPParser` prefix was changed to `PhpParser`. While PHP class names are technically …
30 the autoloader will not be able to load `PHPParser\Parser` or other case variants.
32 Due to conflicts with reserved keywords, some class names now end with an underscore, e.g. `PHPPars…
35 ### Changes to `Node::getType()`
37 The `Node::getType()` method continues to return names using underscores instead of namespace separ…
41 However, some node classes have been moved to a different namespace or renamed, which will result i…
[all …]
H A DCHANGELOG.md13 * Added `indent` option to pretty printer, which can be used to specify the indentation to use
131 * Visitors can now be passed directly to the `NodeTraverser` constructor. A separate call to
219 * Fixed checks for when it is safe to print strings as heredoc/nowdoc to accommodate flexible
622 * Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`,
708 * Added the following methods to `BuilderFactory`, to simplify creation of expressions:
789 * Added `ConstExprEvaluator` to evaluate constant expressions to PHP values.
1123 * Added `kind` attribute to `Expr\Exit` to distinguish between `exit` and `die`.
1126 * Added `kind` attribute to `Expr\Array` to distinguish between `array()` and `[]`.
1127 * Added `kind` attribute to `Scalar\String` and `Scalar\Encapsed` to distinguish between
1196 * Added `shortArraySyntax` option to pretty printer, to print all arrays using short syntax.
[all …]
H A DUPGRADE-5.0.md1 Upgrading from PHP-Parser 4.x to 5.0
32 ### Changes to the parser factory
156 It is possible to convert the name to the previous representation using `$name->getParts()`. The
159 The `Name::getParts()` method is available since PHP-Parser 4.16.0, to allow libraries to support
229 ### Changes to comment assignment
232 assigned to the outermost node only.
309 ### Changes to node constructors
324 ### Changes to the pretty printer
433 ### Changes to the node traverser
471 ### Changes to token representation
[all …]
H A DUPGRADE-4.0.md1 Upgrading from PHP-Parser 3.x to 4.0
6 PHP-Parser now requires PHP 7.0 or newer to run. It is however still possible to *parse* PHP 5.2-5.6
11 ### Changes to the node structure
15 automatically convert strings to `Identifier`s and `Identifier`s implement `__toString()`. As such
16 some code continues to work without changes, but anything using `is_string()`, type-strict
46 * The `name` subnode of `Param` has been renamed to `var` and now contains a `Variable` rather than
48 * The `name` subnode of `StaticVar` has been renamed to `var` and now contains a `Variable` rather
54 can be used to get the effective alias, even if it is not explicitly given.
69 * The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
/PHP-Parser/doc/component/
H A DPretty_printing.markdown4 Pretty printing is the process of converting a syntax tree back to PHP code. In its basic mode of
7 to be rather picky about their code formatting, this mode of operation is not very suitable for
37 * `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP
39 * `newline` (defaults to `"\n"`) can be set to `"\r\n"` in order to produce Windows newlines.
40 * `indent` (defaults to four spaces `" "`) can be set to any number of spaces or a single tab.
42 a legacy option, and `phpVersion` should be used to control this behavior instead.
44 The behaviors controlled by `phpVersion` (defaults to PHP 7.4) are:
59 If you want to make minor changes to the formatting, the easiest way is to extend the pretty printer
62 If you want to have more fine-grained formatting control, the recommended method is to combine the
86 // Run CloningVisitor before making changes to the AST.
[all …]
H A DAST_builders.markdown4 When PHP-Parser is used to generate (or modify) code by first creating an Abstract Syntax Tree and
5 then using the [pretty printer](Pretty_printing.markdown) to convert it to PHP code, it can often
6 be tedious to manually construct AST nodes. The project provides a number of utilities to simplify
63 // it is possible to add manually created nodes
122 wrappers. Also converts literals to AST nodes.
123 * `funcCall($name, array $args = [])`: Create a function call node. Converts `$name` to a `Name`
128 `$class` to a `Name` node, `$name` to an `Identifier` node and normalizes arguments.
131 * `constFetch($name)`: Create a constant fetch node. Converts `$name` to a `Name` node.
132 * `classConstFetch($class, $name)`: Create a class constant fetch node. Converts `$class` to a
133 `Name` node and `$name` to an `Identifier` node.
[all …]
H A DPerformance.markdown4 Parsing is computationally expensive task, to which the PHP language is not very well suited.
5 Nonetheless, there are a few things you can do to improve the performance of this library, which are
16 the `xdebug.default_enable=0` ini option does *not* disable Xdebug. The *only* way to disable
17 Xdebug is to not load the extension in the first place.
20 you may want to consider automatically restarting PHP with Xdebug unloaded. The
21 [composer/xdebug-handler](https://github.com/composer/xdebug-handler) package can be used to do
24 If you do run with Xdebug, you may need to increase the `xdebug.max_nesting_level` option to a
38 Many objects in this project are designed for reuse. For example, one `Parser` object can be used to
H A DName_resolution.markdown4 Since the introduction of namespaces in PHP 5.3, literal names in PHP code are subject to a
13 The `NameResolver` visitor can (and for nearly all uses of the AST, should) be applied to resolve n…
14 to their fully-qualified form, to the degree that this is possible.
33 a namespace `Foo`, a call to `strlen()` may either refer to the namespaced `\Foo\strlen()`, or
34 the global `\strlen()`. Because PHP-Parser does not have the necessary context to decide this,
35 such names are left unresolved. Additionally, a `namespacedName` **attribute** is added to the
51 `resolvedName` attribute will be added to each name, which contains the resolved (fully qualified)
55 The `replaceNodes` attribute is useful if you wish to perform modifications on the AST, as you
56 probably do not wish the resulting code to have fully resolved names as a side-effect.
81 Next to name resolution, the `NameContext` also supports the reverse operation of finding a short
[all …]
H A DError_handling.markdown4 …ng or analysis are represented using the `PhpParser\Error` exception class. In addition to an error
13 Before using column information, its availability needs to be checked with `$e->hasColumnInfo()`, a…
14 …r cannot always be determined. The methods for retrieving column information also have to be passed
20 . ' to ' . $e->getEndLine() . ':' . $e->getEndColumn($code);
38 To instead collect all encountered errors into an array, while trying to continue parsing the rest …
39 an instance of `ErrorHandler\Collecting` can be passed to the `Parser::parse()` method. A usage exa…
/PHP-Parser/test/code/parser/stmt/namespace/
H A DoutsideStmtInvalid.test8 Namespace declaration statement has to be the very first statement in the script from 4:1 to 4:9
37 No code may exist outside of namespace {} from 3:1 to 3:7
61 No code may exist outside of namespace {} from 3:1 to 3:17
H A DinvalidName.test5 Cannot use A as self because 'self' is a special class name from 1:16 to 1:19
25 Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
45 Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
/PHP-Parser/doc/
H A D2_Usage_of_basic_components.markdown12 require 'path/to/vendor/autoload.php';
15 Additionally, you may want to set the `xdebug.max_nesting_level` ini option to a higher value:
28 In order to parse code, you first have to create a parser instance:
220 The pretty printer component compiles the AST back to PHP code according to a specified scheme.
242 = 'Hello '; // change to 'Hello '
277 going to look like.
374 helps you work with namespaced code by trying to resolve most names to fully qualified ones.
381 In order to know that `B\C` really is `A\C` you would need to track aliases and namespaces yourself.
398 A small example to understand the concept: We want to convert namespaced code to pseudo namespaces,
467 possible, so we don't need to do that. We only need to create a string with the name parts separated
[all …]
/PHP-Parser/test/code/parser/expr/
H A Dalternative_array_syntax.test162 Syntax error, unexpected '{' from 3:3 to 3:3
163 Syntax error, unexpected '{' from 4:3 to 4:3
164 Syntax error, unexpected '{' from 5:6 to 5:6
165 Syntax error, unexpected '{' from 6:8 to 6:8
166 Syntax error, unexpected '{' from 7:6 to 7:6
167 Syntax error, unexpected '{' from 8:2 to 8:2
168 Syntax error, unexpected '{' from 9:5 to 9:5
169 Syntax error, unexpected '{' from 10:11 to 10:11
170 Syntax error, unexpected '{' from 11:10 to 11:10
/PHP-Parser/test/code/prettyPrinter/expr/
H A Dliterals.test24 // integers (normalized to decimal)
31 // floats (normalized to ... something)
83 // shell exec (similar to double quoted string)
106 // integers (normalized to decimal)
112 // floats (normalized to ... something)
160 // shell exec (similar to double quoted string)
/PHP-Parser/grammar/
H A DREADME.md12 applied to it:
21 Run `php grammar/rebuildParsers.php` to rebuild the parsers. Additional options:
23 * The `KMYACC` environment variable can be used to specify an alternative `kmyacc` binary.
25 need to compile [moriyoshi's fork](https://github.com/moriyoshi/kmyacc-forked).

Completed in 34 milliseconds

123