nikic
92f793001b
Fix some readme + doccomment typos
2011-09-28 16:26:51 +02:00
nikic
d53173c2f3
Don't use references in NodeTraverser
...
Stop using reference magic in the NodeTraverser. Instead use normal return values. Additionally enfore that an array is passed to ->traverse().
2011-09-24 23:39:05 +02:00
nikic
d5f148b43f
Merge Node_Name and Node_Name_Normal
2011-09-24 23:31:18 +02:00
nikic
df7cb44eed
Use seperate Name node classes instead of type subnode
2011-09-24 16:53:40 +02:00
nikic
858545732c
Add shared Node_Const
...
Node_Const is shared between Node_Stmt_ClassConst and Node_Stmt_Const. Maybe one could generalize it to a Node_NameToValue to share it with Node_Stmt_Declare too.
2011-09-23 21:00:59 +02:00
nikic
8bd8e815c9
Add missing doc and pretty print for Stmt_Declare
2011-09-23 18:53:11 +02:00
nikic
ea65ea7a32
Make some doc comments more precise
...
Additionally add two further constructors
2011-09-23 18:45:29 +02:00
nikic
ee4e55dc75
Move Node_Expr_FuncCallArg to Node_Arg (just like Node_Param)
2011-09-22 20:34:35 +02:00
nikic
06b7d63406
Add specialized constructors for statement nodes with only one subnode
2011-09-22 20:27:12 +02:00
nikic
a551bbc5a4
Add PHPParser_Node interface
2011-09-21 21:43:19 +02:00
nikic
3583c1955f
Improve NodeDumper performance and make testAgainstDirectory more friendly
2011-09-06 17:10:58 +02:00
nikic
847cdbc5c6
Swap argument order for ArrayItem
2011-09-02 19:49:46 +02:00
nikic
393221ce63
Some minor improvements (performance and exception wise) for the node traverser
2011-08-31 21:19:31 +02:00
nikic
63525d36e7
Fix / improve some method doc docomments / signatures
2011-08-22 17:38:05 +02:00
nikic
9cc2cf322b
Iterate replacement nodes using all visitors apart from the one having made the replacement
2011-08-20 16:16:59 +02:00
nikic
17a81b5c8f
Properly parse escape sequences:
...
* Add support for oct and hex escape sequences
* Take used quote type into account when parsing encapsed strings
2011-08-20 10:40:27 +02:00
nikic
05c514f9c5
Instantiate a Node_Name for 'static', too. Fix some doc comments.
2011-08-19 17:44:42 +02:00
nikic
299893066d
Fix NodeTraverser by putting to-be-deleted and to-be-merged nodes into the same queue. Additionally do not further iterate queued nodes.
2011-08-19 17:19:27 +02:00
nikic
ca51472c2f
Move Variable to Expr_Variable, move Stmt_FuncParam to Param (as it is used both in stmts and expr and both in funcs and methods)
2011-08-14 18:51:42 +02:00
nikic
bd602afc3a
Add specialized constructor for lambdas, too
2011-08-14 18:26:06 +02:00
nikic
7bd3980a2e
Remove node analysis from analyze.php and fix some other things about it
2011-08-14 15:52:57 +02:00
nikic
96350be172
Implement the debug parser by extending the normal parser. That way there is no need to repeat all action codes and lookup tables twice.
2011-08-14 15:36:15 +02:00
nikic
297c9ac290
Use moriyoshi's fork of kmyacc, which fixes most of the issues of kmyacc with PHP
2011-08-14 14:52:24 +02:00
nikic
e0fe21287d
Add specialized constructors for all expression nodes apart from lambda
2011-08-11 10:25:51 +02:00
nikic
f412b3915f
Rename cast nodes and give them a common Expr_Cast parent (with specialized constructor)
2011-08-11 09:20:25 +02:00
nikic
284f32f475
Add specialized constructor for binary operators
2011-08-11 08:57:13 +02:00
nikic
22b507e9f4
Rename Bin[ary] to Bitwise (which is the correct name)
2011-08-11 08:42:28 +02:00
nikic
344913d44b
Add specialized constructors for assignment operations
2011-08-11 08:35:10 +02:00
nikic
d9a23f2dc7
Add specialized constructors for Expr_Array*, make Variable an Expr
2011-08-11 08:13:01 +02:00
nikic
c06cbb53dc
Make for-loop formatting nicer
2011-08-11 07:53:55 +02:00
nikic
690b505a7a
Make array_pair an extra grammar rule, for cleaner grammar and correct $line
2011-08-10 11:24:20 +02:00
nikic
1da728321f
Rename tests from Unit_ to PHPParser_Tests_
2011-08-10 11:13:37 +02:00
nikic
818eb3940b
Allow to pass a string to the constructor of Node_Name
2011-08-09 15:23:18 +02:00
nikic
f67ff50550
Give all Scalar nodes and the special nodes Name and Variable specialized constructors for easier use
2011-08-09 15:07:05 +02:00
nikic
800bb9d94a
Remove unused files
2011-08-09 14:24:26 +02:00
nikic
ae46aeda7f
Don't save whether a string is binary anymore. The binary flag isn't going to be used in the next couple of years, so it doesn't make sense to unnecessarily complicate things.
2011-08-09 14:19:44 +02:00
nikic
197b8e6967
Don't save quote type for strings anymore (as it is irrelevant for script execution)
2011-08-09 14:12:15 +02:00
nikic
7d43c02c06
Fix analyzer.php
2011-08-09 13:26:04 +02:00
nikic
c013467b48
Add NodeTraverser documentation
2011-08-09 12:55:32 +02:00
nikic
2c68d1c09e
Update testsuite
2011-08-09 12:42:12 +02:00
nikic
567f7c3536
Add possibility to delete and merge nodes in traverser
2011-08-09 12:32:18 +02:00
nikic
f00701fd8a
Use classes for visitors
2011-08-09 09:28:58 +02:00
nikic
ffecbf8ca5
Let the pretty printing methods for statements decide for themselves whether or not they add a semicolon. Only automatically add semicolons for expressions.
2011-08-04 18:44:21 +02:00
nikic
684a638f46
Add possibility to pretty print expressions to PrettyPrinter
2011-08-04 18:19:45 +02:00
nikic
29bac2a120
Further Name node methods
2011-08-04 16:30:04 +02:00
nikic
664be2871a
Make the resolve type of a name a normal subnode (type)
2011-08-04 13:59:56 +02:00
nikic
9c53838b1f
Properly handle fully qualified and relative names
2011-08-04 13:53:23 +02:00
nikic
2703f42933
If the short alias syntax is used compute the alias instead of setting it to null
2011-08-04 12:58:12 +02:00
nikic
afd6c70b77
Merge preprocessor.php into rebuildParser.php. Don't distribute the temporary preprocessed grammar anymore
2011-08-04 12:46:48 +02:00
nikic
12e61cb3ea
Allow use of normal dollar variables in .pre.phpy (by transforming them to #hash variables for kmyacc)
2011-08-04 12:16:31 +02:00