nikic
417a8bb07e
Add support for yield expressions (PHP 5.5)
...
This adds a new Yield expression type, with subnodes key and value.
2012-09-07 23:41:57 +02:00
nikic
ae3774f0f2
Add support for finally clauses (PHP 5.5)
...
This adds a new finallyStmts subnode to the TryCatch node. If there is
no finally clause it will be null.
2012-09-07 23:41:56 +02:00
nikic
f8f1e17e41
Add support for list() in foreach (PHP 5.5)
...
Example: foreach ($coords as list($x, $y)) { ... }
This change slightly breaks backwards compatability, as it changes the
node structure for the previously existing `list(...) = $foo` assignments.
Those no longer have a dedicated `AssignList` node; instead they are
parsed as a normal `Assign` node with a `List` as `var`. Similarly the
use in `foreach` will generate a `List` for `valueVar`.
2012-09-07 23:41:55 +02:00
nikic
8d218110db
Fix some doc comments
2012-09-07 23:41:54 +02:00
nikic
eb5991227d
Add Class->getMethods() function
2012-07-07 16:24:07 +02:00
nikic
4137d7a7a8
Add modifier accessors for ClassMethod etc
2012-07-07 16:08:37 +02:00
nikic
2f5ebf7c4d
Store line and doc comment as attributes
2012-05-04 10:16:59 +02:00
nikic
48f0322aef
Add method builder
2012-03-10 23:25:26 +01:00
nikic
cf3117d82d
Fix parsing of integers that overflow into floats
...
Integers in hex/oct/bin notation that overflowed into floats were parsed incorrectly.
2012-01-15 16:54:48 +01:00
nikic
94d4c30a72
Fully Cover and fix NameResolver
...
Previously type hints were not resolved due to a typo. Also trait uses were not resolved.
2011-12-10 12:11:53 +01:00
nikic
df691065a6
Fix __halt_compiler() usage in namespace
...
This fixes the only left bug that was reported by parsing the PHP testsuite :)
2011-12-07 18:36:38 +01:00
nikic
80065965d3
[5.4] Add new \e escape sequence (0x1B/27)
2011-12-04 17:35:30 +01:00
nikic
db3181aff1
More test coverage and doc string parsing fixes
...
The parser didn't account for the additional newline after the content of doc strings, which is left there by the tokenizer for some reason. Additoinally esacape sequences were parsed in nowdoc strings.
Additionally this contains some minor changes to the grammar: Some _list nonterminals were refactored to have the possible single elements in a reparate rule and only assemble those single elements. (This reduces duplication and gives better assignment of line number context.)
2011-12-04 16:52:43 +01:00
nikic
6ef6e1dab3
Cover errors (and fix errors for namespace names)
2011-11-27 12:58:20 +01:00
nikic
933bebb9b8
Fix parsing of special int syntaxes
...
Also add the means to test code parsing.
2011-11-26 16:09:39 +01:00
nikic
6ecae86981
[5.4] Add support for traits
2011-10-30 12:03:29 +01:00
nikic
613aa84f80
[5.4] Add support for static closures
...
This adds another property to Expr_Closure named "static". It's true for static closures and false otherwise.
2011-10-29 00:16:29 +02:00
nikic
126efbc056
Make more things optional
...
Make $stmts and $subNodes optional in most places
2011-10-28 19:14:06 +02:00
nikic
a3c24cf86c
[API] Rename Stmt_Func to Stmt_Function
2011-10-28 19:08:01 +02:00
nikic
f202aa9814
[API] Make all constructors specialized
...
For nodes that accept many optional arguments I chose to keep the $subNodes argument, but provide default values instead.
2011-10-28 19:06:24 +02:00
nikic
25f37ccc28
[API] Rename LambdaFunc to Closure
...
The term "closure" is more commonly used in PHP, even if the function doesn't use() any variables.
2011-10-26 18:34:12 +02:00
nikic
734dbecbc9
Add some more constructors
2011-10-21 16:51:37 +02:00
nikic
920f12f958
Allow __halt_compiler(); after braced namespaces
2011-10-20 23:06:38 +02:00
nikic
9ed77427a2
Rename Expr_List to Expr_AssignList
2011-10-16 14:49:13 +02:00
nikic
df657b703e
Rename caseList to cases in Node_Stmt_Switch
2011-10-15 19:30:48 +02:00
nikic
2d57f52d24
Add more specialized constructors
2011-10-15 19:28:15 +02:00
nikic
a7a7dfce18
Remove useless condition from Throw printer
2011-09-30 19:30:33 +02:00
nikic
535cf21b73
Swap argument order for Node_Case
...
$cond is now the first parameter and is not optional.
2011-09-30 19:19:17 +02:00
nikic
62183807ee
Add test coverage for Node_Name
...
And fix bugs found while doing so.
2011-09-28 18:11:28 +02:00
nikic
92f793001b
Fix some readme + doccomment typos
2011-09-28 16:26:51 +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
847cdbc5c6
Swap argument order for ArrayItem
2011-09-02 19:49:46 +02:00
nikic
63525d36e7
Fix / improve some method doc docomments / signatures
2011-08-22 17:38:05 +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
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
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
818eb3940b
Allow to pass a string to the constructor of Node_Name
2011-08-09 15:23:18 +02:00