Changeset 2656
- Timestamp:
- 08/16/08 14:06:17 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tendra/src/producers/ada/asis/asis-gela-contexts-utils.adb
r2604 r2656 66 66 use Asis.Gela.Unit_Utils; 67 67 68 function Find_Unit return Asis.Compilation_Unit is 69 Next : Asis.Element; 70 begin 71 for J in 1 .. Length (The_Context.Compilation.all) loop 72 Next := Get_Item (The_Context.Compilation, J); 73 if Next.all in Compilation_Unit_Node'Class then 74 return Asis.Compilation_Unit (Next); 75 end if; 76 end loop; 77 78 return Asis.Nil_Compilation_Unit; 79 end Find_Unit; 80 68 81 Index : Natural; 69 82 Next : Asis.Element; … … 90 103 then 91 104 Add_Pragma (Last_Unit, Next, True); 92 else 93 if Is_Configuration_Pragma (Pragma_Kind (Next.all)) then 105 elsif Is_Configuration_Pragma (Pragma_Kind (Next.all)) then 94 106 Make_Configuration_Unit (The_Context); 95 107 Add_Pragma 96 108 (Asis.Element (The_Context.Configuration_Unit), Next); 97 else 98 Errors.Report (Item => Next, 99 What => Errors.Error_Syntax_Misplaced_Pragma, 100 Argument1 => Pragma_Name_Image (Next.all)); 101 end if; 109 elsif Is_Program_Unit_Pragma (Pragma_Kind (Next.all)) then 110 Element_Utils.Set_Enclosing_Compilation_Unit (Next, Find_Unit); 111 Errors.Report (Item => Next, 112 What => Errors.Error_Syntax_Misplaced_Pragma, 113 Argument1 => Pragma_Name_Image (Next.all)); 114 else 115 Element_Utils.Set_Enclosing_Compilation_Unit (Next, Find_Unit); 116 Errors.Report (Item => Next, 117 What => Errors.Warning_Syntax_Ignored_Pragma, 118 Argument1 => Pragma_Name_Image (Next.all)); 102 119 end if; 103 120 end if; trunk/tendra/src/producers/ada/asis/asis-gela-contexts.adb
r2573 r2656 535 535 Utils.Read_File_And_Supporters (The_Context); 536 536 537 if The_Context.Error /= Successthen537 if The_Context.Error > Warning then 538 538 Implementation.Set_Status 539 539 (Asis.Errors.Environment_Error, trunk/tendra/src/producers/ada/asis/asis-gela-errors.ads
r2588 r2656 14 14 type Code is 15 15 (Success_Dummy, 16 Warning_ Dummy,16 Warning_Syntax_Ignored_Pragma, 17 17 Error_Syntax_Assoc_In_Attribute, 18 18 Error_Syntax_Too_Many_Constraints, … … 47 47 48 48 subtype Success_Code is Code range Success_Dummy .. Success_Dummy; 49 subtype Warning_Code is Code range Warning_Dummy .. Warning_Dummy; 49 subtype Warning_Code is Code range 50 Warning_Syntax_Ignored_Pragma .. Warning_Syntax_Ignored_Pragma; 51 50 52 subtype Error_Code is Code range 51 53 Error_Syntax_Assoc_In_Attribute .. Error_Cant_Read_Unit; 54 52 55 subtype Fatal_Code is Code range Fatal_Dummy .. Fatal_Dummy; 53 56