Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZincScopeElementBase"/> class with a given initial name register.
 /// </summary>
 /// <param name="nameRegister">The name register that will store the identifiers defined in this scope.</param>
 protected ZincScopeElementBase(ZincIdentNameRegister nameRegister = null)
 {
     if (nameRegister != null)
     {
         this.nameRegister = nameRegister;
     }
     else
     {
         this.nameRegister = new ZincIdentNameRegister(null);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZincIdentNameRegister"/> class with a given optional parent
 /// name register.
 /// </summary>
 /// <param name="parent">The parent name register, optional, by default <c>null</c>.</param>
 public ZincIdentNameRegister(ZincIdentNameRegister parent = null) : base(null, x => new ZincIdent(x))
 {
     this.Parent   = parent;
     this.Fallback = checkUpperNameRegister;
 }