Dead code. cleaning up parse. allowing trailing commas. starting to work on the 'os' palette

This commit is contained in:
Dustin Swan 2026-02-07 12:57:14 -07:00
parent a30d2217b8
commit 2d687b5d38
No known key found for this signature in database
GPG key ID: 30D46587E2100467
5 changed files with 77 additions and 112 deletions

View file

@ -13,9 +13,7 @@ import stdlibCode from './stdlib.cg?raw';
import designTokensCode from './design-tokens.cg?raw';
import uiComponentsCode from './ui-components.cg?raw';
import textInputCode from './textinput-test.cg?raw';
// import testCode from './test.cg?raw';
// import counterApp from './counter.cg?raw';
import osCode from './os.cg?raw';
const canvas = document.createElement('canvas') as HTMLCanvasElement;
document.body.appendChild(canvas);
@ -28,7 +26,7 @@ if (clearButton) {
const cgCode = stdlibCode + '\n' +
designTokensCode + '\n' +
uiComponentsCode + '\n' +
textInputCode + '\n'
osCode + '\n'
try {
const tokens = tokenize(cgCode);
@ -41,7 +39,8 @@ try {
const persisted = loadStore();
for (const def of definitions) {
const body = persisted?.[def.name]?.body ?? def.body;
// const body = persisted?.[def.name]?.body ?? def.body;
const body = def.body;
const deps = startTracking(def.name);
const value = evaluate(body, env, cgCode);