Package dtool.ast.expressions

Examples of dtool.ast.expressions.IInitializer


 
  protected NodeResult<? extends DefinitionVariable> parseDefinitionVariable_afterIdentifier(
    DefParseHelper parse, Reference ref, ProtoDefSymbol defId)
  {
    ArrayList<DefVarFragment> fragments = null;
    IInitializer init = null;
    Reference cstyleSuffix = null;
   
    final boolean isAutoRef = ref == null;
   
    parsing: {
View Full Code Here


  }
 
  protected DefVarFragment parseVarFragment(boolean isAutoRef) {
    ProtoDefSymbol fragId = parseDefId();
    ParseHelper parse = new ParseHelper(fragId.getStartPos());
    IInitializer init = null;
   
    if(!fragId.isMissing()) {
      if(tryConsume(DeeTokens.ASSIGN)){
        init = parseInitializer().node;
      } else if(isAutoRef) {
View Full Code Here

  }

  public DefinitionEnumVarFragment parseEnumVarFragment() {
    ProtoDefSymbol defId = parseDefId();
    ArrayView<TemplateParameter> tplParams = null;
    IInitializer initializer = null;
   
    ParseHelper parse = new ParseHelper(defId.nameSourceRange.getStartPos());
   
    parsing: {
      parse.checkResult(defId);
View Full Code Here

    cp.append("auto");
  }
 
  @Override
  public Collection<INamedElement> findTargetDefElements(IModuleResolver mr, boolean findFirstOnly) {
    IInitializer initializer = getParent_().getDeclaredInitializer();
    if(initializer instanceof IValueNode) {
      IValueNode valueNode = (IValueNode) initializer;
      return valueNode.resolveTypeOfUnderlyingValue(mr);
    }
    return null;
View Full Code Here

  public INamedElement resolveEffectiveType(IModuleResolver mr) {
    Reference declaredType = varDef.getDeclaredType();
    if(declaredType != null) {
      return getFirstElementOrNull(declaredType.findTargetDefElements(mr, true));
    }
    IInitializer initializer = varDef.getDeclaredInitializer();
    if(initializer instanceof IValueNode) {
      IValueNode initializerR = (IValueNode) initializer;
      return getFirstElementOrNull(initializerR.resolveTypeOfUnderlyingValue(mr));
    }
   
View Full Code Here

 
  public class ParseArrayInitEntry extends ElementListParseHelper<ArrayInitEntry> {
    @Override
    protected ArrayInitEntry parseElement(boolean createMissing) {
      Expression index = null;
      IInitializer initializer = null;
     
      if(lookAhead() == DeeTokens.COLON) {
        index = parseAssignExpression_toMissing();
        consumeLookAhead(DeeTokens.COLON);
        initializer = parseNonVoidInitializer(true).node;
      } else {
        initializer = parseNonVoidInitializer(createMissing).node;
       
        if(initializer == null)
          return null;
       
        if(lookAhead() == DeeTokens.COLON && initializerCanParseAsExp(initializer)) {
          if(initializer instanceof InitializerArray) {
            index = (InitializerArray) initializer;
          } else {
            index = (Expression) initializer;
          }
          consumeLookAhead(DeeTokens.COLON);
          initializer = parseNonVoidInitializer(true).node;
        }
      }
     
      ASTNode startNode = index != null ? index : initializer.asNode();
      return concludeNode(srToPosition(startNode, new ArrayInitEntry(index, initializer)));
    }
View Full Code Here

      if(lookAhead() == DeeTokens.COLON ||
        (lookAhead() == DeeTokens.IDENTIFIER && lookAhead(1) == DeeTokens.COLON)) {
        member = parseRefIdentifier();
        consumeLookAhead(DeeTokens.COLON);
      }
      IInitializer init = parseNonVoidInitializer(createMissing || member != null).node;
      if(init == null)
        return null;
     
      ASTNode startNode = member != null ? member : init.asNode();
      return concludeNode(srToPosition(startNode, new StructInitEntry(member, init)));
    }
View Full Code Here

TOP

Related Classes of dtool.ast.expressions.IInitializer

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.