From 0b92f706ad978e1322d1b98570819c00ca6f0c89 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 3 Dec 2021 14:46:40 -0500 Subject: [PATCH] terminal parses boolean exactly. --- src/Terminal/Parser.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Terminal/Parser.ts b/src/Terminal/Parser.ts index 7e6bf280c..bf9dc1883 100644 --- a/src/Terminal/Parser.ts +++ b/src/Terminal/Parser.ts @@ -99,6 +99,7 @@ export function ParseCommand(command: string): (string | number | boolean)[] { const arg = command.substr(start, i - start); // If this is a number, convert it from a string to number + console.log(arg); if (isNumber(arg)) { args.push(parseFloat(arg)); } else if (arg === "true") { @@ -119,8 +120,13 @@ export function ParseCommand(command: string): (string | number | boolean)[] { const arg = command.substr(start, i - start); // If this is a number, convert it from string to number + console.log(arg); if (isNumber(arg)) { args.push(parseFloat(arg)); + } else if (arg === "true") { + args.push(true); + } else if (arg === "false") { + args.push(false); } else { args.push(arg); }