public bool Visit(MainBlock node) { foreach (var declarationsPart in node.DeclsParts) { declarationsPart.Accept(this); } foreach (var declarationsPart in node.DeclsParts) { if (!(declarationsPart is CallableDeclNode callableDecl) || !callableDecl.Header.CallableSymbol.IsForward) { continue; } foreach (var callable in _symStack.FindFunc(callableDecl.Header.Name.ToString())) { if (callable.IsForward) { throw new Exception(string.Format( "({0}, {1}) semantic error: forward declaration is not solved", callableDecl.Header.Name.Token.Line, callableDecl.Header.Name.Token.Column)); } } } node.MainCompound.Accept(this); return(true); }