public LanguageType Visit(WhileNode node) { var condtype = node.Condition.Accept(this); if (condtype != LanguageType.Int && condtype != LanguageType.Time) { throw new AlangExeption(node, $"Condition in while statement is {condtype.ToLower()}, and should be either int or time"); } node.AcceptChildren(this); return(LanguageType.Null); }
public void Visit(WhileNode node) { node.Condition.Accept(this); node.AcceptChildren(this); }