Skip to content

panda debug 's *.ast.json should include endColumn and endLine #3407

@azu

Description

@azu

Description

https://panda-css.com/docs/guides/debugging#panda-debug

The panda debug is useful for detecting Panda CSS usage locations such as css(), but currently only includes start line/column position information, which makes it incomplete.
Therefore, I propose including end line/column information as well.

Problem Statement/Justification

Current *.ast.json does not include end line/column.

[
  {
    "name": "css",
    "type": "object",
    "data": [
      {
        "transitionProperty": "all",
        "opacity": "0.5",
        "border": "1px solid",
        "borderColor": "black",
        "color": "gray.600",
        "_hover": {
          "color": "gray.900"
        },
        "rounded": "md",
        "p": "1.5",
        "_dark": {
          "borderColor": "rgba(255, 255, 255, 0.1)",
          "color": "gray.400",
          "_hover": {
            "color": "gray.50"
          }
        }
      }
    ],
    "kind": "CallExpression",
    "line": 13,
    "column": 9
  }
]

Proposed Solution or API

Add endColumn and endLineNumber to *.ast.json

Alternatives

No response

Additional Information

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