Beispiel #1
0
 public TypeNameMember(MemberFlags flags, string name, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.flags = flags;
     this.name = name;
     this.parentScope = parentScope;
 }
Beispiel #2
0
 public Function(string name, MemberFlags flags, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.name = name;
     this.flags = flags;
     this.parentScope = parentScope;
 }
Beispiel #3
0
 public Function(string name, MemberFlags flags, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.name        = name;
     this.flags       = flags;
     this.parentScope = parentScope;
 }
Beispiel #4
0
 public TypeNameMember(MemberFlags flags, string name, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.flags       = flags;
     this.name        = name;
     this.parentScope = parentScope;
 }
Beispiel #5
0
 public PseudoScope(Scope parent)
     : base(parent.GetModule())
 {
     this.placeHolder = null;
     this.parentScope = parent;
     this.members = new Dictionary<string, ScopeMember> ();
     this.chainNamespace = null;
 }
Beispiel #6
0
 public LexicalScope(Scope parentScope, Function parentFunction)
     : base(parentScope.GetModule())
 {
     this.members = new Dictionary<string, ScopeMember> ();
     this.parentScope = parentScope;
     this.parentFunction = parentFunction;
     this.index = parentFunction.AddLexicalScope(this);
 }
Beispiel #7
0
 public PropertyVariable(string name, MemberFlags flags, IChelaType type, IChelaType[] indices, Scope parentScope)
     : base(type, parentScope.GetModule())
 {
     SetName(name);
     this.flags = flags;
     this.indices = indices;
     this.parentScope = parentScope;
 }
Beispiel #8
0
 public PropertyVariable(string name, MemberFlags flags, IChelaType type, IChelaType[] indices, Scope parentScope)
     : base(type, parentScope.GetModule())
 {
     SetName(name);
     this.flags       = flags;
     this.indices     = indices;
     this.parentScope = parentScope;
 }
Beispiel #9
0
 public LexicalScope(Scope parentScope, Function parentFunction)
     : base(parentScope.GetModule())
 {
     this.members        = new Dictionary <string, ScopeMember> ();
     this.parentScope    = parentScope;
     this.parentFunction = parentFunction;
     this.index          = parentFunction.AddLexicalScope(this);
 }
Beispiel #10
0
        public void CheckScopeVisibility(AstNode node, Scope scope)
        {
            // Check the parent scope access.
            Scope parentScope = scope.GetParentScope();
            if(parentScope != null)
                CheckScopeVisibility(node, parentScope);

            // Internal scopes module must be the current one.
            if(scope.IsInternal() && scope.GetModule() != currentModule)
                Error(node, "cannot access internal member " + scope.GetFullName() +" of another module.");
        }
Beispiel #11
0
 public TypeGroup(string name, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.name        = name;
     this.parentScope = parentScope;
 }
Beispiel #12
0
 public TypeGroup(string name, Scope parentScope)
     : this(parentScope.GetModule())
 {
     this.name = name;
     this.parentScope = parentScope;
 }