Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: better-php-par…
Commits on Apr 28, 2014
  1. PHP: Fix some globals not being declared static

    This prevents the symbols from being exported and possibly conflicting
    with other ones.
  2. PHP: Recognize vertical tab (\v) and form-feed (\f) as whitespaces

    Even though PHP doesn't handle those very well (it emits warnings about
    "unexpected character"), it still counts them as whitespaces, so
    properly handle them as such.
Commits on Aug 8, 2013
Commits on Aug 1, 2013
  1. PHP: Fix infinite loop reading an identifier ending at EOF

    Bit-wise operation is inappropriate here because `c` might be negative,
    since EOF is generally represented as -1.  Since -1 is stored as all
    bits at 1 on most common architectures, the test will evaluate to true,
    hence entering an infinite loop.
Commits on Apr 17, 2013
  1. PHP: add test file for traits

  2. PHP: add test file for classes

  3. PHP: add test files for namespaces

  4. Fix PHP tests

Commits on Apr 12, 2013
  1. PHP: leave PHP mode inside single line comments

    If "?>" appears in a single-line PHP comment it leaves PHP mode.
  2. PHP: fix parsing functions arguments list containing comment or strings

    Instead of hand-parsing the argument list and possibly choking inside
    comments, strings, heredoc, etc., use the normal token mechanism and
    simply convert the tokens to a string representation as the argument
    list.  This technique might perhaps lead to some missing characters in
    the argument list representation in the (unlikely) case a token
    appearing in the argument list is reported as a generic type for which
    it is impossible to know the correct string representation, but this
    could always be fixed by adding a specific token type and is anyway
    less problematic than maybe breaking further parsing of the document.
  3. PHP: parse namespaces

    PHP namespaces don't work anything like a block, so the implementation
    is specific and not combined with scope management.  Namespaces cannot
    be nested, and they may apply either to the rest of the file (until the
    next namespace declaration, if any) or to a specific block.
    Namespaces applying to the rest of the file:
    	namespace Foo;
    	/* code in namespace Foo */
    	namespace Bar\Baz;
    	/* code in namespace Bar\Baz */
    Namespaces applying to blocks:
    	namespace Foo {
    		/* code in namespace Foo */
    	namespace Bar\Baz {
    		/* code in namespace Bar\Baz */
    	namespace {
    		/* code in root namespace */
  4. PHP: fix generating variable tags for rvalues

    Only generate tags for variable declarations without assignments inside
    classes and interfaces not to get fooled by rvalues.
    This prevents generation of a "$bar" tag for something like:
    	$foo = $bar;
    while still generating "$bar" tag for:
    	class Foo {
    		var $bar;
  5. PHP: report anonymous functions as functions rather than variables

    Generate a full function tag for anonymous functions:
    	$anon = function($arg1, $arg2) {
    		/* ... */
  6. PHP: make some arguments const

  7. PHP: fix parsing of functions returning a reference

    Fix parsing of functions declarations with a leading ampersand (&),
    used to make the function return a reference:
    	function &foo($arg1, $arg2) {
    		/* ... */
  8. PHP: parse and report interfaces

  9. PHP: report class inheritance

  10. PHP: report visibility and implementation type

    Report visibility (private/protected/public) and implementation
    (abstract or not) for every tag for which it makes sense.
  11. Rewrite the PHP parser as a non-regex parser

    Rewrite the PHP parser as a real parser, not using regexes.  This is
    more complex but allows for better parsing.
    Visible changes:
    * Scope reporting;
    * Variables inside functions are no longer reported (this is a
      deliberate choice, but can be easily changed);
    * Only the PHP part is parsed (e.g. it doesn't report JavaScript
      functions anymore);
    * Function arguments spanning several lines are properly reported;
    * Interfaces are not yet parsed.
    Otherwise the new parser should behave like the old one, at least
    where it used to be right.  Parsing of more constructs and reporting
    more details is planned.
Commits on Dec 16, 2012
  1. Removed assignment no longer required

    dfishburn authored
    git-svn-id: c5d04d22-be80-434c-894e-aa346cc9e8e8
  2. Removed BOM from file and changed encoding to latin1

    dfishburn authored
    git-svn-id: c5d04d22-be80-434c-894e-aa346cc9e8e8
  3. Removed duplicate test case

    dfishburn authored
    git-svn-id: c5d04d22-be80-434c-894e-aa346cc9e8e8
Commits on Dec 4, 2012
  1. Added additional test files

    dfishburn authored
    git-svn-id: c5d04d22-be80-434c-894e-aa346cc9e8e8
Commits on Nov 7, 2012
  1. Fixed compiler warnings

    dfishburn authored
    git-svn-id: c5d04d22-be80-434c-894e-aa346cc9e8e8
Something went wrong with that request. Please try again.