Reorganize ui
This commit is contained in:
parent
e841106029
commit
bf5eb54932
18 changed files with 31 additions and 28 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { Expr, FieldAssignment, FieldPattern, Literal, Pattern, ProductPattern } from "../lang/expr";
|
import { Expr, FieldAssignment, FieldPattern, Literal, Pattern, ProductPattern } from "src/lang/expr";
|
||||||
|
|
||||||
export function Expression(prop: { expr: Expr }) {
|
export function Expression(prop: { expr: Expr }) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Closure, Value, Env, EnvFrame } from '../lang/eval/value';
|
import { Closure, Value, Env, EnvFrame } from 'src/lang/eval/value';
|
||||||
import { exprToString, productPatternToString } from './Expr';
|
import { exprToString, productPatternToString } from './Expr';
|
||||||
|
|
||||||
export function Val(prop: { value: Value }) {
|
export function Val(prop: { value: Value }) {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { spawnNewFunctionDraftDigith } from "./scrowlStore";
|
import { spawnNewFunctionDraftDigith } from "src/ui/Scrowl/scrowlStore";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { For, Match, Show, Switch } from "solid-js";
|
import { For, Match, Show, Switch } from "solid-js";
|
||||||
import { ParseError } from "src/lang/parser/parser";
|
import { ParseError } from "src/lang/parser/parser";
|
||||||
import { SourceText } from "src/lang/parser/source_text";
|
import { SourceText } from "src/lang/parser/source_text";
|
||||||
import { ShowParseError } from "./ParseError";
|
import { ShowParseError } from 'src/ui/Component/ParseError';
|
||||||
import { Program } from "src/lang/program";
|
import { Program } from "src/lang/program";
|
||||||
|
|
||||||
export type DigithError = {
|
export type DigithError = {
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import { createSignal, Show } from "solid-js";
|
import { createSignal, Show } from "solid-js";
|
||||||
import { Digith } from "../Digith";
|
import { Digith } from "src/ui/Digith";
|
||||||
import { useProgram } from "../ProgramProvider";
|
import { useProgram } from "src/ui/ProgramProvider";
|
||||||
import { CodeEditor } from "../CodeEditor";
|
import { CodeEditor } from "src/ui/Component/CodeEditor";
|
||||||
import { sourceText } from "src/lang/parser/source_text";
|
import { sourceText } from "src/lang/parser/source_text";
|
||||||
import { Program } from "src/lang/program";
|
import { Program } from "src/lang/program";
|
||||||
import { V, Validation, letValidate } from "../validation";
|
import { V, Validation, letValidate } from "src/ui/validation";
|
||||||
import { validateExprRaw, validateParamsRaw } from "./Helpers";
|
import { validateExprRaw, validateParamsRaw } from "./Helpers";
|
||||||
import { updateDigith } from "../scrowlStore";
|
import { updateDigith } from "src/ui/Scrowl/scrowlStore";
|
||||||
import { DigithError } from "../DigithError";
|
import { DigithError } from "src/ui/Digith/DigithError";
|
||||||
|
|
||||||
type Input = {
|
type Input = {
|
||||||
raw_params: string,
|
raw_params: string,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { ParseError, parseExpr, parseFunctionName, parseFunctionParameters } from "src/lang/parser/parser";
|
import { ParseError, parseExpr, parseFunctionName, parseFunctionParameters } from "src/lang/parser/parser";
|
||||||
import { sourceText } from "src/lang/parser/source_text";
|
import { sourceText } from "src/lang/parser/source_text";
|
||||||
import { Expr, FunctionName, ProductPattern } from "src/lang/expr";
|
import { Expr, FunctionName, ProductPattern } from "src/lang/expr";
|
||||||
import { V } from "../validation";
|
import { V } from "src/ui/validation";
|
||||||
|
|
||||||
// === Parser wrappers ===
|
// === Parser wrappers ===
|
||||||
export function validateNameRaw(input: string): V<FunctionName, ParseError> {
|
export function validateNameRaw(input: string): V<FunctionName, ParseError> {
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
import { createSignal } from "solid-js";
|
import { createSignal } from "solid-js";
|
||||||
import { Digith } from "../Digith";
|
import { Digith } from "src/ui/Digith";
|
||||||
import { useProgram } from "../ProgramProvider";
|
import { useProgram } from "src/ui/ProgramProvider";
|
||||||
import { CodeEditor } from "../CodeEditor";
|
import { CodeEditor } from "src/ui/Component/CodeEditor";
|
||||||
import { sourceText } from "src/lang/parser/source_text";
|
import { sourceText } from "src/lang/parser/source_text";
|
||||||
import { Program } from "src/lang/program";
|
import { Program } from "src/lang/program";
|
||||||
import { V, Validation, letValidate } from "../validation";
|
import { V, Validation, letValidate } from "src/ui/validation";
|
||||||
import { validateExprRaw, validateNameRaw, validateParamsRaw } from "./Helpers";
|
import { validateExprRaw, validateNameRaw, validateParamsRaw } from "./Helpers";
|
||||||
import { spawnFunctionDigith } from "../scrowlStore";
|
import { spawnFunctionDigith } from "src/ui/Scrowl/scrowlStore";
|
||||||
import { DigithError } from "../DigithError";
|
import { DigithError } from "src/ui/Digith/DigithError";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type Input = {
|
type Input = {
|
||||||
raw_name: string,
|
raw_name: string,
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import { createSignal, Match, Switch } from 'solid-js';
|
import { createSignal, Match, Switch } from 'solid-js';
|
||||||
import { useProgram } from './ProgramProvider';
|
import { useProgram } from 'src/ui/ProgramProvider';
|
||||||
import { eval_start } from 'src/lang/eval/evaluator';
|
import { eval_start } from 'src/lang/eval/evaluator';
|
||||||
import { Value } from 'src/lang/eval/value';
|
import { Value } from 'src/lang/eval/value';
|
||||||
import { RuntimeError } from 'src/lang/eval/error';
|
import { RuntimeError } from 'src/lang/eval/error';
|
||||||
import { SourceText, sourceText } from 'src/lang/parser/source_text';
|
import { SourceText, sourceText } from 'src/lang/parser/source_text';
|
||||||
import { ParseError, parseExpr } from 'src/lang/parser/parser';
|
import { ParseError, parseExpr } from 'src/lang/parser/parser';
|
||||||
import { ShowParseError } from './ParseError';
|
import { ShowParseError } from 'src/ui/Component/ParseError';
|
||||||
import { Val } from './Value';
|
import { Val } from 'src/ui/Component/Value';
|
||||||
import { CodeEditor } from './CodeEditor';
|
import { CodeEditor } from 'src/ui/Component/CodeEditor';
|
||||||
|
|
||||||
namespace ReplResult {
|
namespace ReplResult {
|
||||||
export type Idle =
|
export type Idle =
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FunctionName } from "src/lang/expr";
|
import { FunctionName } from "src/lang/expr";
|
||||||
import { DigithId } from "./scrowlStore";
|
import { DigithId } from "src/ui/Scrowl/scrowlStore";
|
||||||
|
|
||||||
export type Digith =
|
export type Digith =
|
||||||
| Digith.Repl
|
| Digith.Repl
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { createEffect, For, Match, onMount, Switch } from "solid-js";
|
import { createEffect, For, Match, onMount, Switch } from "solid-js";
|
||||||
import { ExprREPL } from "./REPL";
|
import { ExprREPL } from "src/ui/Digith/REPL";
|
||||||
import { clearFocus, DigithId, scrowl } from "./scrowlStore";
|
import { clearFocus, DigithId, scrowl } from "./scrowlStore";
|
||||||
import { NewFunctionDraftDigith } from "./Function/NewFunctionDraftDigith";
|
import { NewFunctionDraftDigith } from "src/ui/Digith/Function/NewFunctionDraftDigith";
|
||||||
import { FunctionDigith } from "./Function/FunctionDigith";
|
import { FunctionDigith } from "src/ui/Digith/Function/FunctionDigith";
|
||||||
import { Digith } from "./Digith";
|
import { Digith } from "src/ui/Digith";
|
||||||
|
|
||||||
// WTF are these names?
|
// WTF are these names?
|
||||||
// Scrowl
|
// Scrowl
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { createStore } from "solid-js/store";
|
import { createStore } from "solid-js/store";
|
||||||
import { Digith } from "./Digith";
|
import { Digith } from "src/ui/Digith";
|
||||||
import { Program } from "src/lang/program";
|
import { Program } from "src/lang/program";
|
||||||
import { FunctionName } from "src/lang/expr";
|
import { FunctionName } from "src/lang/expr";
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Controls } from "./Controls";
|
import { Controls } from "./Controls/index";
|
||||||
import { ProgramMeta } from "./ProgramMeta";
|
import { ProgramMeta } from "./ProgramMeta";
|
||||||
|
|
||||||
export function Sidebar() {
|
export function Sidebar() {
|
||||||
|
|
|
||||||
|
|
@ -98,3 +98,4 @@ export function letValidate<A, T extends Record<string, any>, E, B>(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue