Skip to content

ast: parsed Call location Text attribute off by one character #7989

@anderseknert

Description

@anderseknert
package p

r if foo(bar(1))
opa parse p.rego --format json --json-include locations
{
    "location": {
        "file": "p.rego",
        "row": 3,
        "col": 10,
        "text": "YmFyKDEpKQ=="
    },
    "type": "call",
    "value": [

    ]
}
echo "YmFyKDEpKQ==" | base64 -d
bar(1))

The text should of course be bar(1) with only a single closing paren.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions