Package com.icona.tree.nodes.Type

Examples of com.icona.tree.nodes.Type.BasicDataType


  @Override
  public Object transformDependents() {
    // TODO: Checks at runtime if the class of parent is declaration or not
    if(parent.getClass()==Declaration.class){
      BasicDataType p=((Declaration)parent).dataType; //TODO BasicModifier: Should be generic
      if(isFinal() && p.getDataType()==null)
        p.setDataType(NativeType.INT);
      else
        return null;
     
      return p;
    }
View Full Code Here



  @Override
  public void transformSelf() {
    // NOTE: The order here matters //TODO Declaration: Try to get rid of order
    BasicDataType tempDataType=(BasicDataType)modifier.transformDependents();
    if(tempDataType!=null)
      dataType=tempDataType;
    tempDataType=(BasicDataType)specifier.transformDependents();
    if(tempDataType!=null)
      dataType=tempDataType;
View Full Code Here

        
        //Setting parent to null as its parent rule can define itself who the parent is
          retval.modifier =new BasicModifier(null);
          retval.specifier =new Specifier(null);
          retval.dataType =new BasicDataType();

        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:266:2: ( (ts= type_specifier |tq= type_qualifier )+ )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:267:3: (ts= type_specifier |tq= type_qualifier )+
            {
View Full Code Here

        
        //Setting parent to null as its parent rule can define itself who the parent is
          retval.modifier =new BasicModifier(null);
          retval.specifier =new Specifier(null);
          retval.dataType =new BasicDataType();

        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:419:2: ( (s= storage_class_specifier |ts= type_specifier |tq= type_qualifier )+ )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:420:2: (s= storage_class_specifier |ts= type_specifier |tq= type_qualifier )+
            {
View Full Code Here

    // TODO Auto-generated method stub
    //throw new UnsupportedOperationException();
    if(specifierSize==null)
      return null;
    if(parent.getClass() == Declaration.class){
      BasicDataType p=((Declaration)parent).dataType;//TODO Specifier: transformDependents should be genreic
      if(isDoubleLong)
        p.setDataType(NativeType.LONG);
      else if(specifierSize==NativeSpecifier.SHORT)
        p.setDataType(NativeType.SHORT);
      else if(specifierSize==NativeSpecifier.LONG && p.getDataType()!=NativeType.DOUBLE)
        p.setDataType(NativeType.INT);
     
      return (Object)p;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.icona.tree.nodes.Type.BasicDataType

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.