private void Compile() { // compile script var lexer = new Lexer(_code); var parser = new Parser(lexer, _fileHandler); var ast = parser.ParseScript(); ExportGeneralFunctions(); foreach (var func in _settings.Functions) { _environment.ExportFunction(func); } Compiler.Compile(_environment, ast); _interpreter = new Interpreter(_environment); }