diff options
author | murphy <murphy@rubychan.de> | 2010-03-31 22:17:06 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-03-31 22:17:06 +0000 |
commit | 862bc9aa6b002f6b29cf74f93ca66e63cf370819 (patch) | |
tree | 45e8a8731fadca8df5fe86595dc2e8f6dc7a3782 /test/scanners/php | |
parent | cce5dad0dce285a2b7c4f1fe0ec79d10c71a8403 (diff) | |
download | coderay-862bc9aa6b002f6b29cf74f93ca66e63cf370819.tar.gz |
Upporting changes from 0.9.2 (vs. 0.9.1).
Diffstat (limited to 'test/scanners/php')
-rw-r--r-- | test/scanners/php/namespaces.expected.raydebug | 9 | ||||
-rw-r--r-- | test/scanners/php/namespaces.in.php | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/scanners/php/namespaces.expected.raydebug b/test/scanners/php/namespaces.expected.raydebug new file mode 100644 index 0000000..47074a9 --- /dev/null +++ b/test/scanners/php/namespaces.expected.raydebug @@ -0,0 +1,9 @@ +inline_delimiter(<?php) +reserved(namespace) ident(foo)operator(;) +reserved(use) ident(blah)operator(\\)ident(blah) reserved(as) ident(foo)operator(;) + +local_variable($a) operator(=) reserved(new) ident(my)operator(\\)ident(name)operator(()operator(\))operator(;) comment(// instantiates "foo\\my\\name" class) +ident(foo)operator(\\)ident(bar)operator(::)ident(name)operator(()operator(\))operator(;) comment(// calls static method "name" in class "blah\\blah\\bar") +ident(my)operator(\\)ident(bar)operator(()operator(\))operator(;) comment(// calls function "foo\\my\\bar") +local_variable($a) operator(=) ident(my)operator(\\)constant(BAR)operator(;) comment(// sets $a to the value of constant "foo\\my\\BAR") +inline_delimiter(?>) diff --git a/test/scanners/php/namespaces.in.php b/test/scanners/php/namespaces.in.php new file mode 100644 index 0000000..ad6a1a1 --- /dev/null +++ b/test/scanners/php/namespaces.in.php @@ -0,0 +1,9 @@ +<?php +namespace foo; +use blah\blah as foo; + +$a = new my\name(); // instantiates "foo\my\name" class +foo\bar::name(); // calls static method "name" in class "blah\blah\bar" +my\bar(); // calls function "foo\my\bar" +$a = my\BAR; // sets $a to the value of constant "foo\my\BAR" +?> |