상속: Statement
예제 #1
0
파일: codegen.cs 프로젝트: shugo/babel
 public override void VisitRaise(RaiseStatement raise)
 {
     raise.Value.Accept(this);
     if (raise.Value.NodeType == typeManager.StrType) {
         Type etype = typeof(Exception);
         ConstructorInfo constructor =
             etype.GetConstructor(new Type[] { typeof(string) });
         ilGenerator.Emit(OpCodes.Newobj, constructor);
     }
     ilGenerator.Emit(OpCodes.Throw);
 }
예제 #2
0
파일: typecheck.cs 프로젝트: shugo/babel
 public override void VisitRaise(RaiseStatement raise)
 {
     raise.Value.Accept(this);
     if (raise.Value.NodeType != typeManager.StrType &&
         !raise.Value.NodeType.IsSubtypeOf(typeManager.ExceptionType)) {
         report.Error(raise.Location, "exception expected");
     }
 }
예제 #3
0
파일: node.cs 프로젝트: shugo/babel
 public virtual void VisitRaise(RaiseStatement raise)
 {
 }