Changeset 2660

Show
Ignore:
Timestamp:
09/22/08 18:26:21 (4 months ago)
Author:
maxr
Message:

ada: bugfix - return False instead of raise Inapropriate_Element
exception is functions like 'Is_%', 'Has_%' and Declaration_Origin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tendra/src/producers/ada/asis/asis-declarations.adb

    r2574 r2660  
    673673         Enclosing_Compilation_Unit (Declaration.all); 
    674674   begin 
    675       Check_Nil_Element (Declaration, "Is_Subunit"); 
    676       return Is_Equal (Declaration, Unit_Declaration (Enclosing_Unit.all)) 
    677         and Unit_Kind (Enclosing_Unit.all) in A_Subunit; 
     675      if Assigned (Declaration) then 
     676         return Is_Equal (Declaration, Unit_Declaration (Enclosing_Unit.all)) 
     677           and Unit_Kind (Enclosing_Unit.all) in A_Subunit; 
     678      else 
     679         return False; 
     680      end if; 
    678681   end Is_Subunit; 
    679682 
  • trunk/tendra/src/producers/ada/xml/asis/asis-adb.xsl

    r2455 r2660  
    3333    <xsl:when test="contains(@name, '_Kind')"> 
    3434      return <xsl:call-template name="real-not-a-kind"/>; 
     35</xsl:when> 
     36<xsl:when test="starts-with (@name, 'Is_') or starts-with (@name, 'Has_')"> 
     37      return False; 
     38</xsl:when> 
     39<xsl:when test="@name='Declaration_Origin'"> 
     40      return Not_A_Declaration_Origin; 
    3541</xsl:when> 
    3642    <xsl:otherwise>