Examples of TspExpansionElement


Examples of dtool.sourcegen.TemplatedSourceProcessorParser.TspExpansionElement

    while(elementStream.hasNext()) {
      TspElement tspElem = elementStream.next();
      elementStream = elementStream.optimizedSelf();
     
      if(tspElem instanceof TspExpansionElement) {
        TspExpansionElement expansionElem = (TspExpansionElement) tspElem;
       
        boolean endProcessing = processExpansionElement(sourceCase, elementStream, expansionElem);
        if(endProcessing) {
          return;
        }
View Full Code Here

Examples of dtool.sourcegen.TemplatedSourceProcessorParser.TspExpansionElement

    checkError(expansionElem.anonymousExpansion && expansionElem.dontOuputSource, sourceCase);
    checkError(expansionElem.expansionId == null && expansionElem.dontOuputSource, sourceCase);
    checkError(expansionElem.expansionId == null && expansionElem.arguments == null, sourceCase);
   
    ArrayList<Argument> arguments = expansionElem.arguments;
    TspExpansionElement definedExpansionElem = null;
    if(expansionId != null) {
      definedExpansionElem = sourceCase.getExpansion(expansionId);
     
      if(arguments == null) {
        checkError(definedExpansionElem == null, UNDEFINED_REFER, expansionElem);
        arguments = definedExpansionElem.arguments;
      } else {
        // We allow a "redefinition" only if the element is exactly the same
        checkError(definedExpansionElem != null && definedExpansionElem != expansionElem,
          StandardErrors.REDEFINITION, expansionElem);
        putExpansion(sourceCase, expansionId, expansionElem);
      }
    }
    checkError(arguments.size() == 0, StandardErrors.NO_ARGUMENTS, expansionElem);
   
    if(expansionElem.defineOnly || sourceCase.isHeaderCase) {
      // TODO:  situation where there is a pairedExpansionId has no test cases that test it
      return false;
    }
   
    String secondaryIdToActivate = expansionElem.anonymousExpansion ? null : expansionId;
    String pairedIdToActivate = null;
   
    Integer pairedExpansionIx = null;
    TspExpansionElement referredExpansion = null;
    if(expansionElem.pairedExpansionId == null) {
      if(definedExpansionElem != null && expansionElem.anonymousExpansion == false) {
        pairedIdToActivate = definedExpansionElem.pairedExpansionId;
        if(pairedIdToActivate == null) {
          pairedIdToActivate = expansionId;
View Full Code Here

Examples of dtool.sourcegen.TemplatedSourceProcessorParser.TspExpansionElement

        activeExpansions, expansionDefinitions);
    }
   
    public TspExpansionElement getExpansion(String expansionId) {
      if(!isHeaderCase) {
        TspExpansionElement expansionElement = expansionDefinitions.get(expansionId);
        if(expansionElement != null) {
          return expansionElement;
        }
      }
      return globalExpansions.get(expansionId);
View Full Code Here

Examples of dtool.sourcegen.TemplatedSourceProcessorParser.TspExpansionElement

     
      if(DToolTests.TESTS_LITE_MODE) {
        String name = expansionId;
        if(name != null && name.endsWith("__LITE")) {
          name = name.replace("__LITE", "");
          TspExpansionElement value = expansion;
          TspExpansionElement newElem = new TspExpansionElement(name,
            value.pairedExpansionId, value.arguments, value.anonymousExpansion, value.dontOuputSource);
          assertTrue(sourceCase.getExpansion(name) != null);
          addExpansion(sourceCase, name, newElem);
        }
      }
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.