c3c icon indicating copy to clipboard operation
c3c copied to clipboard

AST JSON: Malformed output missing commas

Open Caleb-o opened this issue 1 year ago • 3 comments

Some of the output is missing commas, which makes invalid JSON.

image

Caleb-o avatar Oct 10 '24 00:10 Caleb-o

@Caleb-o I'm fixing some of the commas, but I can't reproduce your example (a struct with what appears to be a list of members as just strings). Can you give your code snippet?

For example, for me

struct Point {
	int x;
	int y;
}

results in

        "types": {
                "example::Point": {
                        "kind": "struct",
                        "members": [
                                {
                                        "name:": "x",
                                        "type:": "Point"
                                },
                                {
                                        "name:": "y",
                                        "type:": "Point"
                                }
                        ]
                }
        },

hwchen avatar Oct 12 '24 01:10 hwchen

@hwchen I just tried running this again and it would seem it has been fixed now?

Caleb-o avatar Oct 12 '24 04:10 Caleb-o

Oh, I see now https://github.com/c3lang/c3c/commit/1adad860f495800be69423a1c2917a72c4ec3d1d

I have some additional fixes up at https://github.com/c3lang/c3c/pull/1550/

hwchen avatar Oct 12 '24 04:10 hwchen

Is this fixed now?

lerno avatar Nov 16 '24 10:11 lerno

I've fixed all issues in the current code.

lerno avatar Jan 11 '25 00:01 lerno