HomePhabricator

Fix a minor XHPAST bug

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
joshuaspenceAuthored on
joshuaspencePushed on Jan 6 2015, 8:42 PM
Reviewer
Blessed Reviewers
Differential Revision
D11215: Fix a minor XHPAST bug
Parents
rPHUe583bc6de6be: Add a `PhutilLibraryTestCase` class
Branches
Unknown
Tags
Unknown