Exemplo n.º 1
0
        private ClassScope CreateClassScope(Scope parent, Vector <Function> methods)
        {
            var members = new ClassScope(parent);

            foreach (var method in methods)
            {
                if (!members.TryIncludeUniqueBinding(method.Name.Identifier, typeRegistry.DeclaredType(method)))
                {
                    LogError(CompilerError.DuplicateIdentifier(method.Position, method));
                }
            }

            return(members);
        }
Exemplo n.º 2
0
        private ClassScope CreateClassScope(Scope parent, Vector<Function> methods)
        {
            var members = new ClassScope(parent);

            foreach (var method in methods)
                if (!members.TryIncludeUniqueBinding(method.Name.Identifier, typeRegistry.DeclaredType(method)))
                    LogError(CompilerError.DuplicateIdentifier(method.Position, method));

            return members;
        }