12 lines
366 B
TypeScript
12 lines
366 B
TypeScript
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`,
|
|
};
|
|
}
|