Permalink
Commits on Jun 8, 2012
  1. Fix test failures due to precision differences

    Travis 5.2 seems to have changed the float output precision, so a test was
    failing. Now the numbers in the expected output are also provided by PHP,
    so they should be the same.
    nikic committed Jun 8, 2012
  2. Make $line argument for Comment optional

    Also add setLine() method.
    nikic committed Jun 8, 2012
Commits on Jun 6, 2012
  1. Add line number information to comments

    Line numbers are stored in the $line property of the PHPParser_Comment
    and PHPParser_Comment_Doc classes and can be retrieved with getLine().
    joncave committed Jun 6, 2012
Commits on May 12, 2012
  1. Update changelog

    nikic committed May 12, 2012
  2. Fix parsing of new expressions in parenthesis

    The new dereferencing syntaxes (new Foo)->bar and (new Foo)['bar'] were
    causing a shift/reduce conflict with the '(' expr ')' rule. When
    (new Foo) was encountered (without dereference operators following) the
    parser thus threw a parse error.
    
    The fix simply adds a special '(' new_expr ')' rule to expr. This does not
    remove the shift/reduce conflict itself, but makes it irrelevant.
    
    This fixes issue #20.
    nikic committed May 12, 2012
Commits on May 11, 2012
  1. Improve some formatting

    nikic committed May 11, 2012
  2. Replace \N with .

    Older PCRE versions (coming with PHP 5.2) don't support \N yet.
    nikic committed May 11, 2012
  3. Fix getAttribute signature in Node interface

    This fixes a build failure on PHP 5.2.
    nikic committed May 11, 2012
  4. Fix comment reformatting on Linux

    Remove the use of \R (with BSR_ANYCRLF) at two places, as it was causing
    problems there.
    nikic committed May 11, 2012
  5. Update CHANGELOG

    nikic committed May 11, 2012
  6. Update docs

    nikic committed May 11, 2012
  7. Insert comments when pretty printing

    This changset also adds unit tests for Comments and adds a way to test the
    pretty printer.
    nikic committed May 11, 2012
Commits on May 6, 2012
  1. Fix $node->getDocComment()

    getDocComment() now returns the last comment (given that it is a doc
    comment). setDocComment() no longer exists, as it doesn't make sense
    with the comment objects anymore. getAttribute() now returns by reference,
    so it also works in reference contexts.
    nikic committed May 6, 2012
  2. Add test coverage for two things

    nikic committed May 6, 2012
  3. Collect normal comments too, not only doc comments

    Comments and doc comments are now saved in the 'comments' attribute, as an
    array. The are instances of PHPParser_Comment[_Doc].
    nikic committed May 6, 2012
Commits on May 5, 2012
  1. Generalize the attribute generation for nodes

    Now two arrays are fetched from the lexer: $startAttributes and
    $endAttributes. When constructing the attributes for a node, the
    $startAttributes from the first token of the node and the $endAttributes
    of the last token of the node are merged.
    
    Now the end line is saved in the endLine attribute.
    nikic committed May 5, 2012
  2. Add progress indicator for test_old.

    I hate waiting for something without seeing at least *some* output.
    nikic committed May 5, 2012
Commits on May 4, 2012
  1. Start refactoring parser skeleton

    The yacc parser skeleton with all those odd $yy short names is quite
    non-obvious. This commits starts to refactor it a bit, to use more
    obvious names and logic.
    nikic committed Apr 29, 2012
  2. Use inject-once approach for lexer

    Now the lexer is injected only once when creating the parser. Instead of
    
        $parser = new PHPParser_Parser;
        $parser->parse(new PHPParser_Lexer($code));
        $parser->parse(new PHPParser_Lexer($code2));
    
    you write:
    
        $parser = new PHPParser_Parser(new PHPParser_Lexer);
        $parser->parse($code);
        $parser->parse($code2);
    nikic committed Apr 25, 2012
  3. Fix typo

    nikic committed Apr 24, 2012
  4. Merge pull request #22 from schmittjoh/resolveCatchType

    fixes a bug where catch type was not resolved
    nikic committed May 4, 2012
  5. Merge pull request #21 from ss23/patch-1

    Update doc/1_Usage_of_basic_components.markdown
    nikic committed May 4, 2012
Commits on Apr 23, 2012
  1. Release version 0.9.1

    This is in anticipation of doing some backwards compatability breaking
    changes in the next version.
    nikic committed Apr 23, 2012
  2. Fix PHP 5.2 build failure

    lcfirst() isn't defined on PHP 5.2, so I added a fallback function, which
    is defined in the bootstrap.php. Not sure whether that's the right place
    to put it.
    nikic committed Apr 23, 2012
  3. Add changelog

    nikic committed Apr 23, 2012
  4. Finish up code generation docs

    nikic committed Apr 23, 2012