public override IPStmt VisitPopStmt(PParser.PopStmtContext context) { method.CanChangeState = true; if (method.Role.HasFlag(FunctionRole.TransitionFunction)) { throw handler.ChangedStateMidTransition(context, method); } return(new PopStmt(context)); }
public override IPStmt VisitPopStmt(PParser.PopStmtContext context) { if (machine?.IsSpec == true) { throw handler.IllegalMonitorOperation(context, context.POP().Symbol, machine); } if (!method.Signature.ReturnType.IsSameTypeAs(PrimitiveType.Null)) { throw handler.PopInNonVoidFunction(context); } method.CanChangeState = true; if (method.Role.HasFlag(FunctionRole.TransitionFunction)) { throw handler.ChangedStateMidTransition(context, method); } return(new PopStmt(context)); }
public override object VisitPopStmt(PParser.PopStmtContext context) { return(null); }