1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-27 04:14:44 +01:00
Commit Graph

85 Commits

Author SHA1 Message Date
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
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
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
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
nikic
eaa9e62900 Add checks against use of self / parent class names and static constructors 2011-08-04 12:03:34 +02:00
nikic
217280c9ba Add getLast and toString (and __toString) methods to Node_Name 2011-08-04 12:02:14 +02:00
nikic
dd2404b57a Rename "ns" to "name" in Stmt_UseUse 2011-08-04 12:01:03 +02:00
nikic
962c4dc0f0 Add some more unit tests 2011-07-13 23:07:05 +02:00
nikic
cc80385aae Fix incorrect line number extraction 2011-07-13 13:27:14 +02:00
nikic
a6f97681f6 Start adding Unit test (PHPUnit) 2011-07-13 13:03:37 +02:00
nikic
43b537f9f9 add NodeTraverser 2011-07-12 18:07:59 +02:00
nikic
a4e6d79116 Make the parser run without errors on 5.4 2011-07-04 21:09:20 +02:00
nikic
78f15cd50b Associate last encountered doccomment with next node 2011-07-03 16:35:45 +02:00
nikic
033f5c81a0 Add missing #line hint for strings 2011-06-28 14:16:10 +02:00
nikic
f756d82cd4 Fetch start line instead of end line 2011-06-28 14:11:12 +02:00
nikic
b153bfa3a8 Remove reentrant error handling code (we don't need that currently) 2011-06-27 19:14:37 +02:00
nikic
d94cd1998b fix typos 2011-06-26 18:45:19 +02:00
nikic
fb45e8a30c Put statements belonging to a namespace statement into its stmt property, add some further checks against invalid namespace usage and fix the pretty printer to print global namespaces 2011-06-26 18:41:01 +02:00
nikic
1478ae9c54 Use ArrayObject for Nodes to abstract away array access implementation details 2011-06-25 17:51:17 +02:00
nikic
dfa59332ed Move halt_compiler handling from parser to grammar 2011-06-12 17:19:12 +02:00
nikic
f11f228074 Associate some line information with nodes (currently the line the node ends in, as the starting line is harder to fetch) 2011-06-12 17:12:47 +02:00
nikic
363a0771da fix incorrect usages of old ParseErrorException 2011-06-06 18:59:14 +02:00
nikic
b24d0e2dc4 Rename PHPParser_ParseErrorException to PHPParser_Error 2011-06-05 18:52:41 +02:00
nikic
83a2077f0e Add Autoloader 2011-06-05 18:47:52 +02:00
nikic
620525a5da Prefix all classes with PHPParser_ 2011-06-05 18:40:04 +02:00
nikic
4006e55951 Fix typo Expr_ErrorSupress -> Expr_ErrorSuppress 2011-06-04 15:37:13 +02:00
nikic
8294ceb754 Fix pretty printing issues caused by Expr_InstanceOf vs Expr_Instanceof 2011-06-04 15:25:54 +02:00
nikic
bf00dff2cf Make halt_compiler() work 2011-06-03 22:04:05 +02:00
nikic
d1f09c311e Fix ambiguity when pretty printing dynamic property fetches with arrays 2011-06-03 18:24:21 +02:00
nikic
d82bbb3bea Throw ParseErrorException on error instead of error callback
As long as the parser isn't reentrant having an error callback doesn't really make sense and only complicates everything.
2011-06-03 17:44:23 +02:00