Skip to content

Invalid start location for class constants / properties #511

Open
@czosel

Description

@czosel

Input:

<?php
class A
{
    const test = 1;
}

AST (excerpt):

"kind": "classconstant",
          "loc": {
            "source": "test = 1",
            "start": {
              "line": 4,
              "column": 10,
              "offset": 26
            },
            "end": {
              "line": 4,
              "column": 18,
              "offset": 34
            }
          },

I think the start column of the class constant is off, it should be around 4 instead of 10 in the example.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions