Home GnuPG

Fix a minor XHPAST bug
00fe30dd9ebfUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix a minor XHPAST bug

Summary: Currently, there is a minor bug with XHPAST when parsing class methods with no modifiers. See D10687 for some more information.

Test Plan:
Specifically, consider the following:

class Foo {
  public function bar() {}
  function baz() {}
}

Previously when parsing this code with xhpast we get a node of type n_METHOD_DECLARATION: "public function bar() {}" and a node of type n_METHOD_DECLARATION: "baz() {}". After this change, xhpast correctly parses this as a node of type n_METHOD_DECLARATION: "public function bar() {}" and a node of type n_METHOD_DECLARATION: "function baz() {}".

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11215

Details

Provenance
Joshua Spence <josh@joshuaspence.com>Authored on Jan 6 2015, 9:41 PM
Parents
rPHUTILe583bc6de6be: Add a `PhutilLibraryTestCase` class
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPHUTIL00fe30dd9ebf: Fix a minor XHPAST bug (authored by Joshua Spence <josh@joshuaspence.com>).Jan 6 2015, 9:41 PM