Esempio n. 1
0
        protected string GetParentName()
        {
            NamespaceCompilerScope parent = (ParentScope as NamespaceCompilerScope);

            if (parent != null && !string.IsNullOrEmpty(parent.NamespaceName))
            {
                return(parent.NamespaceName);
            }

            return("$global");
        }
Esempio n. 2
0
        private void ParseNamespaceDefinition()
        {
            string namespaceName = ReadFullyQualifiedName();

            // The next token must be a full code block describing the sub-namespace.
            JoopToken namespaceBlockToken = CurrentToken;

            if (Expect(JoopTokenType.Block))
            {
                NamespaceCompilerScope compilerScope = new NamespaceCompilerScope(namespaceName);
                ScopeBlock(compilerScope, namespaceBlockToken);
            }
        }