Commit Graph

58 Commits

Author SHA1 Message Date
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
nikic
0146a41132 Add missing precedence information for UnaryPlus and Minus 2011-06-02 23:15:56 +02:00
nikic
c94b09dec0 Make sure dnumbers are printed as dnumbers even if they could be printed as ints 2011-06-02 23:13:05 +02:00
nikic
eaffc0073c Fix indentation fix for InlineHTML printing 2011-06-02 23:05:14 +02:00
nikic
74f05f5459 Fix wrong node signature in grammar 2011-06-02 22:57:00 +02:00
nikic
b80f326b6a Fix problem with indented strings by introducing PrettyPrinter->pSafe 2011-06-02 22:52:24 +02:00
nikic
352cfde568 Slightly simplify grammar 2011-06-02 17:01:22 +02:00
nikic
1c4d47613c Fix parsing of static methods with dynamic method name 2011-06-02 16:29:28 +02:00
nikic
fabe44ecb1 fix doccomment 2011-06-02 11:39:33 +02:00
nikic
25a5301b21 Optimize the NodeDumper (30% drop) 2011-06-01 22:20:04 +02:00
nikic
f40f10d6b4 Fix InlineHTML printing 2011-05-31 18:27:39 +02:00
nikic
2fb0206deb Add missing rules to parser to allow a::${b} 2011-05-31 17:28:22 +02:00
nikic
4e50877e27 Don't check for method existance in pretty printer anymore 2011-05-31 16:56:03 +02:00
nikic
d1f1fb9877 Add goto support to pretty printer 2011-05-31 16:43:46 +02:00
nikic
4f3260f670 Add doccomments and slightly change some APIs 2011-05-31 16:33:11 +02:00
nikic
68a25ce7c1 Fix typo in grammar 2011-05-30 22:15:17 +02:00
nikic
e6b356af45 Fix some pretty printing issues 2011-05-30 22:11:11 +02:00
nikic
8a3074db38 Decouple NodeDumper from NodeAbstract 2011-05-30 19:21:25 +02:00
nikic
22ea3d6a70 Make Node_Scalar instanceof Node_Expr 2011-05-30 18:01:38 +02:00
nikic
9aed651d51 Remove Stmt_Noop 2011-05-30 17:39:20 +02:00
nikic
196d892090 Furthre work on PrettyPrinter 2011-05-30 17:29:10 +02:00
nikic
9c8651120f Fix wrong Node signature for String_Scalar created by T_STRING_VARNAME 2011-05-29 21:09:37 +02:00
nikic
43b41e382f Further work on PrettyPrinter 2011-05-29 21:06:43 +02:00
nikic
df82e3db45 Replace yydebug flag with separate debug parser "ParserDebug"
Debugging shouldn't be necessairy normally, but carries a 25% performance overhead.
2011-05-29 20:51:15 +02:00
nikic
489f8c8b56 Fix some prettyprinting issues 2011-05-29 20:38:36 +02:00
nikic
15e268cd8b Parse escape sequences in encapsed strings too 2011-05-29 20:06:53 +02:00
nikic
3c13dce680 Further work on PrettyPrinter. Add possibility to test PrettyPrinter correctness 2011-05-29 17:33:03 +02:00
nikic
685171ddc5 Fix incorrect Node creation for dynamic static property access 2011-05-29 12:24:27 +02:00