Exemple #1
0
        public MelonEngine Execute(Context context)
        {
            var interpreter = new MelonInterpreter(this);

            interpreter.Execute(context);

            CompletionValue = interpreter.CompletionValue;

            context.Reset();

            return(this);
        }
Exemple #2
0
        public MelonEngine Execute(string text)
        {
            var parseContext = Parse(text);
            var context      = CreateContext(parseContext);
            var interpreter  = new MelonInterpreter(this);

            interpreter.Execute(context);

            CompletionValue = interpreter.CompletionValue;

            return(this);
        }