Skip to content

attribute start and end loc are the same, and source is undefined #1125

@abdul-alhasany

Description

@abdul-alhasany

Hi
Attribute node is showing the same loc for both start and end. Source is also undefined. For example this code:

<?php
#[Deprecated(
reason: 'since Symfony 5.2, use setPublic() instead',
replacement: '%class%->setPublic(!%parameter0%)'
)]
class Tag implements \JsonSerializable
{
}

produces this AST:

{
  source: undefined,
  start: { line: 5, column: 1, offset: 124 },
  end: { line: 5, column: 1, offset: 124 }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions