Typeclasses
This commit is contained in:
parent
a4daf88085
commit
8020f9d1a0
6 changed files with 123 additions and 19 deletions
|
|
@ -23,13 +23,13 @@ store.viewport = { width: window.innerWidth, height: window.innerHeight };
|
|||
try {
|
||||
const tokens = tokenize(cgCode);
|
||||
const parser = new Parser(tokens, cgCode);
|
||||
const { definitions: defs, typeDefinitions: typeDefs } = parser.parse();
|
||||
const { definitions: defs, typeDefinitions: typeDefs, classDefinitions: classDefs, instanceDeclarations: instances } = parser.parse();
|
||||
loadDefinitions();
|
||||
|
||||
// TODO remove once we're booting from store, files are backup
|
||||
if (!store.paletteHistory) store.paletteHistory = [];
|
||||
|
||||
compileAndRun(defs, typeDefs);
|
||||
compileAndRun(defs, typeDefs, classDefs, instances);
|
||||
saveDefinitions();
|
||||
|
||||
runAppCompiled(canvas, store);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue