예제 #1
0
    public static NeuVar?GetVar(
        this NeuInterpreter interpreter,
        String name)
    {
        /// Locals

        if (interpreter.GetLocalVar(name) is NeuVar localVar)
        {
            return(localVar);
        }

        // Globals

        if (interpreter.GetGlobalVar(name) is NeuVar globalVar)
        {
            return(globalVar);
        }

        ///

        return(null);
    }