Stub out expression handling

This commit is contained in:
Tangent 2023-10-20 21:02:27 -04:00
parent 85b17d6d16
commit ef16fefe48
3 changed files with 19 additions and 2 deletions
src/lib

12
src/lib/expr.ts Normal file
View file

@ -0,0 +1,12 @@
import { AsText, ProcResult, TextPiece } from "../words";
export function Expr({}, argv: TextPiece[]): ProcResult {
const name = argv[0];
if ("bare" in name && name.bare == "expr") {
// being called as [expr ...], not fallback for math
argv.splice(0, 1);
}
return {
text: `Will do math to solve ${argv.map(AsText).join(" ")} eventually`,
};
}