public object Visit(InterfaceDeclaringNode n, object o) { _currentScopeLevel = 1; _currentClassST = new ClassSymbolTable(n, _stdlib, _errorSummary); n.InterfaceMethods.Accept(this, null); AddToGlobalTable(n.Identifier.Value, _currentClassST); return(null); }
public object Visit(InterfaceDeclaringNode n, object o) { _currentScopeLevel = 1; AppendLine($"{AddIndent()}public interface {n.Identifier.Value}"); AppendLine($"{AddIndent()}{{"); IncreaseIndent(); n.InterfaceMethods.Accept(this, null); DecreaseIndent(); AppendLine($"{AddIndent()}}}"); AppendLine(); return(null); }
private InterfaceDeclaringNode InterfaceDeclaring() { InterfaceDeclaringNode itsAST; SourceCodePosition itsPos = _currentToken.SourcePosition; Accept(Token.TokenType.Interface); IdentifierNode itsName = new IdentifierNode(_currentToken); Accept(Token.TokenType.Identifier); Accept(Token.TokenType.LeftBrace); DeclaringSequenceNode itsInterfaceMethodDeclarings = InterfaceMethods(); Accept(Token.TokenType.RightBrace); itsAST = new InterfaceDeclaringNode(itsName, itsInterfaceMethodDeclarings, itsPos); return(itsAST); }