Skip to content

Write interpreter (xD) for "program"s that generates JSON question templates #40

@shamilatesoglu

Description

@shamilatesoglu

To give an example, following program,

QueryColor(
    EventPartner( 
        FilterFirst(
            FilterCollision(
                Events, FilterUnique(SceneAtStart, Z C S)
            )
        ), FilterUnique(SceneAtStart, Z C S)
    )
)

should be converted to following JSON question template,

{
    "nodes": [
      {
        "inputs": [],
        "type": "start_scene"
      },
      {
        "side_inputs": [
          "<Z>",
          "<C>",
          "<S>"
        ],
        "inputs": [
          0
        ],
        "type": "filter_unique"
      },
      {
        "inputs": [],
        "type": "events"
      },
      {
        "inputs": [
          2, 1
        ],
        "type": "filter_events"
      },
      {
        "inputs": [
          3
        ],
        "type": "filter_collision"
      },
      {
        "inputs": [
          4
        ],
        "type": "filter_first"
      },
      {
        "inputs": [
          1, 5
        ],
        "type": "event_partner"
      },
      {
        "inputs": [
          6
        ],
        "type": "query_color"
      }
    ],
    "params": [
      {
        "type": "Size",
        "name": "<Z>"
      },
      {
        "type": "Color",
        "name": "<C>"
      },
      {
        "type": "Shape",
        "name": "<S>"
      }
    ],
    "constraints": []
}

automatically.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions