From 52e06d27f7b4c0ef0ccc593dd93d5cd196bdb3c2 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 5 Aug 2020 22:36:07 -0500 Subject: [PATCH] ast: Improve the compiler detector argument - case insensitive - also support "is turbowarp?" --- src/compiler/astgen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/astgen.js b/src/compiler/astgen.js index e016ea46..863a066f 100644 --- a/src/compiler/astgen.js +++ b/src/compiler/astgen.js @@ -43,8 +43,9 @@ const createVariableData = (scope, varObj) => ({ /** * Determine whether an input is used as a compiler detector. * @param {string} name The name of the argument. + * @returns {boolean} true if this argument is a compiler detector, and its value should become `true` */ -const isCompilerDetectorArgument = name => name === 'is compiled?'; +const isCompilerDetectorArgument = name => name.toLowerCase() === 'is compiled?' || name.toLowerCase() === 'is turbowarp?'; class ScriptTreeGenerator { constructor (thread) {