private object Parse(ParseOperator <string> parseOperator, Type type, Tree <string> parameters) { TypedValue result = TypedValue.Void; Assert.IsTrue(parseOperator.TryParse(processor, type, TypedValue.Void, parameters, ref result)); return(result.Value); }
public static bool IsMatch(ParseOperator <Cell> parseOperator, string input) { var processor = new CellProcessorBase(); ((CellOperator)parseOperator).Processor = processor; return(parseOperator.CanParse(typeof(string), TypedValue.Void, TestUtils.CreateCell(input))); }
static object Parse(ParseOperator <string> parseOperator, Type type, Tree <string> parameters) { Assert.IsTrue(parseOperator.CanParse(type, TypedValue.Void, parameters)); TypedValue result = parseOperator.Parse(type, TypedValue.Void, parameters); return(result.Value); }
[Test] public void AddedFirstGetsExecutedFirst() { var operators = new CellOperators(); var registered = operators.AddFirst("fitsharp.Test.NUnit.Fit.TestOperator"); ParseOperator <Cell> executed = null; operators.Do <ParseOperator <Cell> >(o => true, o => { executed = o; }); Assert.AreSame(registered, executed); }
public static bool IsMatch(ParseOperator<Cell> parseOperator, string input) { var processor = new CellProcessorBase(); ((CellOperator) parseOperator).Processor = processor; return parseOperator.CanParse(typeof (string), TypedValue.Void, TestUtils.CreateCell(input)); }
private object Parse(ParseOperator<string> parseOperator, Type type, Tree<string> parameters) { TypedValue result = TypedValue.Void; Assert.IsTrue(parseOperator.TryParse(processor, type, TypedValue.Void, parameters, ref result)); return result.Value; }
static object Parse(ParseOperator<string> parseOperator, Type type, Tree<string> parameters) { Assert.IsTrue(parseOperator.CanParse(type, TypedValue.Void, parameters)); TypedValue result = parseOperator.Parse(type, TypedValue.Void, parameters); return result.Value; }
public override T VisitParseOperator(ParseOperator node) { throw new NotImplementedException(); }