Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.TypeExpr.sameType()


            // constants the way we can for the other types.
            return valueNode instanceof LiteralValueNode &&
                        (typeExpr.sameType(typeConstants.getByteType()) ||
                         typeExpr.sameType(typeConstants.getShortType()) ||
                         typeExpr.sameType(typeConstants.getIntType()) ||
                         typeExpr.sameType(typeConstants.getIntegerType()) ||
                         typeExpr.sameType(typeConstants.getDecimalType()) ||
                         typeExpr.sameType(typeConstants.getLongType()) ||
                         typeExpr.sameType(typeConstants.getFloatType()) ||
                         typeExpr.sameType(typeConstants.getDoubleType()));
        }
View Full Code Here


            return valueNode instanceof LiteralValueNode &&
                        (typeExpr.sameType(typeConstants.getByteType()) ||
                         typeExpr.sameType(typeConstants.getShortType()) ||
                         typeExpr.sameType(typeConstants.getIntType()) ||
                         typeExpr.sameType(typeConstants.getIntegerType()) ||
                         typeExpr.sameType(typeConstants.getDecimalType()) ||
                         typeExpr.sameType(typeConstants.getLongType()) ||
                         typeExpr.sameType(typeConstants.getFloatType()) ||
                         typeExpr.sameType(typeConstants.getDoubleType()));
        }
       
View Full Code Here

                        (typeExpr.sameType(typeConstants.getByteType()) ||
                         typeExpr.sameType(typeConstants.getShortType()) ||
                         typeExpr.sameType(typeConstants.getIntType()) ||
                         typeExpr.sameType(typeConstants.getIntegerType()) ||
                         typeExpr.sameType(typeConstants.getDecimalType()) ||
                         typeExpr.sameType(typeConstants.getLongType()) ||
                         typeExpr.sameType(typeConstants.getFloatType()) ||
                         typeExpr.sameType(typeConstants.getDoubleType()));
        }
       
        /**
 
View Full Code Here

                         typeExpr.sameType(typeConstants.getShortType()) ||
                         typeExpr.sameType(typeConstants.getIntType()) ||
                         typeExpr.sameType(typeConstants.getIntegerType()) ||
                         typeExpr.sameType(typeConstants.getDecimalType()) ||
                         typeExpr.sameType(typeConstants.getLongType()) ||
                         typeExpr.sameType(typeConstants.getFloatType()) ||
                         typeExpr.sameType(typeConstants.getDoubleType()));
        }
       
        /**
         * @see org.openquark.gems.client.valueentry.ValueEditorProvider#getEditorInstance(ValueEditorHierarchyManager, ValueNode)
View Full Code Here

                         typeExpr.sameType(typeConstants.getIntType()) ||
                         typeExpr.sameType(typeConstants.getIntegerType()) ||
                         typeExpr.sameType(typeConstants.getDecimalType()) ||
                         typeExpr.sameType(typeConstants.getLongType()) ||
                         typeExpr.sameType(typeConstants.getFloatType()) ||
                         typeExpr.sameType(typeConstants.getDoubleType()));
        }
       
        /**
         * @see org.openquark.gems.client.valueentry.ValueEditorProvider#getEditorInstance(ValueEditorHierarchyManager, ValueNode)
         */
 
View Full Code Here

           
            // and we get the newType that we want
            TypeExpr newSourceType = mapEntry.getValue();
                    
            // So if the type was changed, we want to swap the nodes
            if (!newSourceType.sameType(originalSourceExpr)) {
                // we transmute the node to come up with a valueNode of our desired type
                ValueNode valueNode = valueGem.getValueNode().transmuteValueNode(valueNodeBuilderHelper, valueNodeTransformer, newSourceType);
               
                // post definition changes if desired when swapping the nodes
                valueGem.changeValue(valueNode);
View Full Code Here

                   
                    // and we get the newType that we want
                    TypeExpr newSourceType = mapEntry.getValue();
                            
                    // If the type was changed, attach a temporary value gem of the correct type.
                    if (!newSourceType.sameType(originalSourceExpr)) {
                        // Transmute the node to come up with a valueNode of our desired type
                        ValueNode valueNode = valueGem.getValueNode().transmuteValueNode(valueNodeBuilderHelper, valueNodeTransformer, newSourceType);
                       
                        // Create a temporary value gem and connect it.
                        ValueGem tempValueGem = new ValueGem(valueNode);
View Full Code Here

        boolean targetIsNonParametric = !outputType.isPolymorphic();
        boolean exactMatch = false;
       
        // Check whether any of the provided types are an exact match
        for(int typeN = 0, nTypes=destTypeExprs.length; typeN < nTypes; ++typeN) {
            if (targetIsNonParametric && outputType.sameType(destTypeExprs[typeN])) {
                exactMatch = true;
                break;
            }
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.