Beispiel #1
0
 public override string GetFullName()
 {
     if (parentScope != null)
     {
         return(parentScope.GetFullName() + "." + GetName());
     }
     else
     {
         return(GetName());
     }
 }
Beispiel #2
0
        public override string GetFullName()
        {
            if (fullName == null)
            {
                StringBuilder builder = new StringBuilder();
                if (parentScope != null)
                {
                    builder.Append(parentScope.GetFullName());
                    builder.Append('.');
                }
                builder.Append(name);
                builder.Append(" <TG>");
                fullName = builder.ToString();
            }

            return(fullName);
        }
Beispiel #3
0
        public virtual string GetFullName()
        {
            Scope  parentScope = GetParentScope();
            string ret         = string.Empty;

            if (parentScope != null)
            {
                string parentFullname = parentScope.GetFullName();
                if (!string.IsNullOrEmpty(parentFullname))
                {
                    ret = parentFullname + "." + GetName();
                }
                else
                {
                    ret = GetName();
                }
            }
            else
            {
                ret = GetName();
            }

            // Add the generic instance.
            GenericInstance instance = GetGenericInstance();

            if (instance != null)
            {
                ret += instance.GetFullName();
            }

            // Add the generic prototype.
            GenericPrototype proto = GetGenericPrototype();

            if (proto != null && (instance == null || instance.GetParameterCount() == 0))
            {
                ret += proto.GetFullName();
            }

            return(ret);
        }
Beispiel #4
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.");
        }