Skip to content

Using bracket syntax, highlighting fails for global namespace #3

Description

@joshvarner

The bundle currently relies on there being a namespace name after the namespace keyword, but it needs to be able to support the following syntax, which is used for defining items to be placed in the global namespace.

<?php

namespace {
    // This function will go into the global namespace as `\foo()`
    function foo() {
        echo "Bar!";
    }
}

namespace blah {
    // This function will go into the `blah` namespace as `\blah\foo()`
    function foo() {
        echo "Bar!";
    }
}

?>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions