nicer looking

This commit is contained in:
Joeri Exelmans 2025-05-17 09:25:13 +02:00
parent 8abbac4bc9
commit e850952738
14 changed files with 547 additions and 104 deletions

View file

@ -3,20 +3,23 @@ import './App.css';
import { CommandContext } from './CommandContext';
import { Editor, type EditorState } from './Editor';
import { extendedEnv } from './EnvContext';
import { initialEditorState, nonEmptyEditorState, tripleFunctionCallEditorState } from "./configurations";
import { biggerExample, initialEditorState, nonEmptyEditorState, tripleFunctionCallEditorState } from "./configurations";
import { evalEditorBlock } from "./eval";
const commands: [string, string[], string][] = [
["call" , ['c' ], "call" ],
["eval" , ['e','Tab','Enter'], "eval" ],
["transform", ['t', '.' ], "transform" ],
["let" , ['l', '=', 'a' ], "let ... in ..."],
["let" , ['l', '=' ], "let ... in ..."],
["lambda" , ['a' ], "lambda" ],
];
const examples: [string, EditorState][] = [
["empty editor", initialEditorState],
["push to list", nonEmptyEditorState],
["function w/ 4 params", tripleFunctionCallEditorState]];
["function w/ 4 params", tripleFunctionCallEditorState],
["bigger example", biggerExample],
];
type AppState = {
history: EditorState[],