コード例 #1
0
ファイル: Interpreter.cs プロジェクト: snargledorf/SnagScript
        /*
         * Setup interpreter with empty symbol table
         * and register built-in functions.
         */
        public Interpreter()
        {
            CustomFunctions = new List <Function>();

            // Register built-in functions
            scope.SetFunction(new PrintFunction());
            scope.SetFunction(new PrintLineFunction());
            scope.SetFunction(new LenFunction());
            scope.SetFunction(new PauseFunction());
            scope.SetFunction(new ParseIntFunction());
            scope.SetFunction(new ParseFloatFunction());
            scope.SetFunction(new ReadLineFunction());
            scope.SetFunction(new ClearScreenFunction());
            scope.SetFunction(new ReadKeyFunction());
        }