Commit Graph

4 Commits

Author SHA1 Message Date
Arseny Kapoulkine 8e7845076b
Sync to upstream/release/523 (#459) 2022-04-14 16:57:43 -07:00
Lily Brown 510aed7d3f
Fix JsonEncoder for AstExprTable (#454)
JsonEncoder wasn't producing valid JSON for `AstExprTable`s. This PR fixes it. The new output looks like
```json
{
    "type": "AstStatBlock",
    "location": "0,0 - 6,4",
    "body": [
        {
            "type": "AstStatLocal",
            "location": "1,8 - 5,9",
            "vars": [
                {
                    "name": "x",
                    "location": "1,14 - 1,15"
                }
            ],
            "values": [
                {
                    "type": "AstExprTable",
                    "location": "3,12 - 5,9",
                    "items": [
                        {
                            "kind": "record",
                            "key": {
                                "type": "AstExprConstantString",
                                "location": "4,12 - 4,15",
                                "value": "foo"
                            },
                            "value": {
                                "type": "AstExprConstantNumber",
                                "location": "4,18 - 4,21",
                                "value": 123
                            }
                        }
                    ]
                }
            ]
        }
    ]
}
```
2022-04-08 11:26:47 -07:00
Lily Brown 4b7e06e14f
Emit more information for AstLocals in JSON encoder (#364)
We don't emit type annotations right now for `AstLocal`s in the JSON encoder. This makes it really hard to surface annotations in the Agda implementation. This PR changes it to emit location and type annotations, if present.
2022-02-14 14:14:11 -08:00
Arseny Kapoulkine d01addc625 Sync to upstream/release/501 (#20)
Co-authored-by: Rodactor <rodactor@roblox.com>
2021-11-01 14:52:34 -07:00