saghul / txiki.js

A tiny JavaScript runtime
MIT License
2.48k stars 166 forks source link

ffi pattern matching for pointers in args is broken #651

Open KaruroChori opened 3 hours ago

KaruroChori commented 3 hours ago

For example, right now this signature:

int Fl_Window_x(Fl_Window *);

will generate as AST of its argument:

            {
                "kind": "vardef",
                "type": {
                    "kind": "type",
                    "typeModifiers": [],
                    "name": "Fl_Window",
                    "ptr": 0
                },
                "name": "*"
            }

in place of

            {
                "kind": "vardef",
                "type": {
                    "kind": "type",
                    "typeModifiers": [],
                    "name": "Fl_Window",
                    "ptr": 1
                },
                "name": ""
            }
saghul commented 2 hours ago

Ping @lal12 :-)