ast: Improve the compiler detector argument

- case insensitive
- also support "is turbowarp?"
This commit is contained in:
Thomas Weber committed 2020-08-05 22:36:07 -05:00
1 parent a9b205f50c
commit 52e06d27f7
1 file changed
+2 -1
+2 -1
View File
@@ -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) {