microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

compiler is not generating correct code now #452

Closed tballmsft closed 3 years ago

tballmsft commented 3 years ago

image

the write register command is now missing:

{
  "roles": [
    {
      "role": "button 1",
      "serviceShortId": "button"
    },
    {
      "role": "servo 1",
      "serviceShortId": "servo"
    }
  ],
  "handlers": [
    {
      "commands": [
        {
          "sourceId": "S%G[k/b1or8p=;YVB/@+",
          "type": "cmd",
          "command": {
            "type": "CallExpression",
            "arguments": [
              {
                "type": "MemberExpression",
                "object": {
                  "type": "Identifier",
                  "name": "button 1"
                },
                "property": {
                  "type": "Identifier",
                  "name": "down"
                },
                "computed": false
              },
              {
                "type": "Literal",
                "value": true,
                "raw": "true"
              }
            ],
            "callee": {
              "type": "Identifier",
              "name": "awaitEvent"
            }
          }
        }
      ],
      "errors": []
    }
  ]
}
pelikhan commented 3 years ago

Mysterious compile error fixed by https://github.com/microsoft/jacdac-docs/commit/1e55cd6b48f30b32232068eeda8cf71659a86362