public void CallVisitMethod(BasicAstNode node) { var nodeType = node.GetType(); if (!_autoDispatchMethods.ContainsKey(nodeType)) { throw new Exception($"Unsupported Ast type: {nodeType.Name}"); } _autoDispatchMethods[nodeType].Invoke(_visitor, new object[] { node }); }
public TestAstHelper(BasicAstNode expect, BasicAstNode actual) { _expect = expect; _actual = actual; }
public void Visit(BasicAstNode visitable) { _dispatcher.CallVisitMethod(visitable); }
public void Visit(BasicAstNode visitable) { throw new NotImplementedException("Calling IAstVisitor.Visit(BasicAstNode)"); }