/// <summary> /// catch_stmt = "catch" [ identifier ":" type ] block /// </summary> private CatchNode parseCatchStmt() { if (!check(LexemType.Catch)) return null; var node = new CatchNode(); if (peek(LexemType.Identifier)) { node.ExceptionVariable = getValue(); ensure(LexemType.Colon, ParserMessages.SymbolExpected, ':'); node.ExceptionType = ensure(parseType, ParserMessages.ExceptionTypeExpected); } node.Code = ensure(parseBlock, ParserMessages.ExceptionHandlerExpected); return node; }
protected bool Equals(CatchNode other) { return Equals(ExceptionType, other.ExceptionType) && string.Equals(ExceptionVariable, other.ExceptionVariable) && Equals(Code, other.Code); }
protected bool Equals(CatchNode other) { return(Equals(ExceptionType, other.ExceptionType) && string.Equals(ExceptionVariable, other.ExceptionVariable) && Equals(Code, other.Code)); }