Package com.redhat.ceylon.compiler.typechecker.tree.Tree

Examples of com.redhat.ceylon.compiler.typechecker.tree.Tree.NaturalLiteral


    public void visit(final Tree.SequenceType that) {
        super.visit(that);
        if (inExtends) {
            final ProducedType elementType =
                    that.getElementType().getTypeModel();
            final NaturalLiteral length = that.getLength();
            ProducedType t;
            if (length==null) {
                t = new LazyProducedType(unit) {
                    @Override
                    public TypeDeclaration initDeclaration() {
                        return unit.getSequentialDeclaration();
                    }
                    @Override
                    public Map<TypeParameter, ProducedType> initTypeArguments() {
                        List<TypeParameter> stps =
                                unit.getSequentialDeclaration().getTypeParameters();
                        return singletonMap(stps.get(0), elementType);
                    }
                };
            }
            else {
                final int len;
                try {
                    len = Integer.parseInt(length.getText());
                }
                catch (NumberFormatException nfe) {
                    return;
                }
                if (len<1 || len>100) {
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.typechecker.tree.Tree.NaturalLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.