示例#1
0
文件: AST.cs 项目: apspecial/IFN660
        public override bool ResolveNames(LexicalScope scope)
        {
            var newScope = new LexicalScope(scope);

            foreach (var blkstat in blockStatements)
            {
                if (blkstat is Declaration)
                {
                    var decl = (Declaration)blkstat;
                    newScope.Add(decl);
                }
            }
            foreach (var blkstat in blockStatements)
            {
                ResolveNames(newScope);
            }
            return(true);
        }
示例#2
0
文件: AST.cs 项目: apspecial/IFN660
        public override bool ResolveNames(LexicalScope scope)
        {
            identifier.ResolveNames(scope);
            var newScope = new LexicalScope(scope);

            foreach (var formal in formalParameterList)
            {
                if (formal is Declaration)
                {
                    var decl = (Declaration)formal;
                    newScope.Add(decl);
                }
            }
            foreach (var formal in formalParameterList)
            {
                ResolveNames(newScope);
            }
            return(true);
        }