From 6cce5bb6ed039b4842d25bd9f21a6125ec210f62 Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Fri, 25 Aug 2023 12:05:06 -0400 Subject: [PATCH] Move Command/Script to broader-scope type --- src/notcl.ts | 4 +--- src/words.ts | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notcl.ts b/src/notcl.ts index dcb10e5..4fff10b 100644 --- a/src/notcl.ts +++ b/src/notcl.ts @@ -1,15 +1,13 @@ import { escapeHtml } from "./helpers"; import { AtLeast, Choose, End, Pattern, Regex, Sequence, Use } from "./peg"; import { + Script, Word as WordType, TextWord, EnchantedWord as EnchantedWordType, SimplifyWord, } from "./words"; -export type Command = WordType[]; -export type Script = Command[]; - const Comment = Regex(/#[^\n]*/y) .expects("#") .map(() => []); diff --git a/src/words.ts b/src/words.ts index 00f5e93..f99a0d0 100644 --- a/src/words.ts +++ b/src/words.ts @@ -74,3 +74,5 @@ export function SimplifyWord( } export type Word = EnchantedWord | TextWord | HtmlWord | InterpolatedWord; +export type Command = Word[]; +export type Script = Command[];