ast: Improve the compiler detector argument
- case insensitive - also support "is turbowarp?"
This commit is contained in:
1 file changed
+2
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user