Homec4science

Fix a minor XHPAST bug

Authored by Joshua Spence <josh@joshuaspence.com> on Jan 6 2015, 21:41.

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

Committed
Joshua Spence <josh@joshuaspence.com>Jan 6 2015, 21:41
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUe583bc6de6be: Add a `PhutilLibraryTestCase` class
Branches
Unknown
Tags
Unknown

Event Timeline

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