コード例 #1
0
ファイル: Absy.cs プロジェクト: Chenguang-Zhu/ICE-C5
 /// <summary>
 /// Adds the given formals to the current variable context, and then resolves
 /// the types of those formals.  Does NOT resolve the where clauses of the
 /// formals.
 /// Relies on the caller to first create, and later tear down, that variable
 /// context.
 /// </summary>
 /// <param name="rc"></param>
 protected void RegisterFormals(List<Variable> formals, ResolutionContext rc) {
   Contract.Requires(rc != null);
   Contract.Requires(formals != null);
   foreach (Formal/*!*/ f in formals) {
     Contract.Assert(f != null);
     if (f.Name != TypedIdent.NoName) {
       rc.AddVariable(f, false);
     }
     f.Resolve(rc);
   }
 }
コード例 #2
0
ファイル: AbsyCmd.cs プロジェクト: Chenguang-Zhu/ICE-C5
 public override void Resolve(ResolutionContext rc)
 {
     //Contract.Requires(rc != null);
       rc.PushVarContext();
       foreach (Variable/*!*/ v in Locals) {
     Contract.Assert(v != null);
     rc.AddVariable(v, false);
       }
       foreach (Cmd/*!*/ cmd in Cmds) {
     Contract.Assert(cmd != null);
     cmd.Resolve(rc);
       }
       rc.PopVarContext();
 }
コード例 #3
0
ファイル: Absy.cs プロジェクト: Chenguang-Zhu/ICE-C5
 public override void Register(ResolutionContext rc) {
   //Contract.Requires(rc != null);
   rc.AddVariable(this, false);
 }