Bens Compiler Notes - theRAPTLab/gsgo GitHub Wiki

Misc Compiler Notes

AppCore vs DataCore

  • AppCore -- If it's state that turns program features on/off or creates derived data structures from models to be used to render something, then that is an AppCore state thing.

  • DataCore -- If you are manipulating model data, then that's a datacore function.

If you need to respond to something changing in datacore, to recreate derived state, that is something that you could either implement in datacore, or create a subscription mechanism in the AppStateGroup thingy that will know when to re-read and re-create derived display state data.

The subscription mechanism for now is probably an URmessage like "somedata of type changed"

And then the datacore module itself is the ONLY module that fires that signal.


JSX / Compile sources

Scripts are rendered into JSX in three places:

  1. Rounds Editor: PanelRound > PanelRoundEditor > SubpanelScript.jsx
  2. Instance Editor: InstanceEditor.jsx
  3. Script Editor: ScriptEditor > PanelScript > mod-panel-script.js

This means that when testing keywords, they need to be tested in all three contexts, as they all use slightly different compile/render steps.

⚠️ **GitHub.com Fallback** ⚠️