Changeset 378


Ignore:
Timestamp:
Jan 6, 2015, 1:41:15 PM (6 years ago)
Author:
Maxim Reznik
Message:

Process assigment statement

Location:
trunk/ada-2012
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/ag/down.ag

    r367 r378  
    212212Rules for assignment_statement. :
    213213(.
    214       ${Assignment_Expression.Down} := 0;  --  FIXME
     214      --  FIXME
     215      Gela.Pass_Utils.Resolve.Interpretation
     216        (Self.Compilation,
     217         ${assignment_statement.env_in},
     218         ${Assignment_Expression.Up},
     219         ${Assignment_Expression.Down});
    215220.)
    216221
  • trunk/ada-2012/src/asis/asis-statements.adb

    r349 r378  
    1111
    1212with Gela.Element_Visiters;
     13with Gela.Elements.Assignment_Statements;
    1314with Gela.Elements.Associations;
    1415with Gela.Elements.Auxiliary_Applies;
     16with Gela.Elements.Expressions;
    1517with Gela.Elements.Names;
    1618with Gela.Elements.Prefixes;
     
    116118      return Asis.Expression
    117119   is
     120      package Get is
     121         type Visiter is new Gela.Element_Visiters.Visiter with record
     122            Result : Gela.Elements.Element_Access;
     123         end record;
     124
     125         overriding procedure Assignment_Statement
     126           (Self : in out Visiter;
     127            Node : not null Gela.Elements.Assignment_Statements.
     128              Assignment_Statement_Access);
     129      end Get;
     130
     131      package body Get is
     132
     133         overriding procedure Assignment_Statement
     134           (Self : in out Visiter;
     135            Node : not null Gela.Elements.Assignment_Statements.
     136              Assignment_Statement_Access)
     137         is
     138            X : constant Gela.Elements.Expressions.Expression_Access :=
     139              Node.Assignment_Expression;
     140         begin
     141            Self.Result := Gela.Elements.Element_Access (X);
     142         end Assignment_Statement;
     143      end Get;
     144
     145      V : Get.Visiter;
    118146   begin
    119147      Check_Nil_Element (Statement, "Assignment_Expression");
    120       Raise_Not_Implemented ("");
    121       return Asis.Nil_Element;
     148      Statement.Data.Visit (V);
     149      return (Data => V.Result);
    122150   end Assignment_Expression;
    123151
     
    130158      return Asis.Expression
    131159   is
     160      package Get is
     161         type Visiter is new Gela.Element_Visiters.Visiter with record
     162            Result : Gela.Elements.Element_Access;
     163         end record;
     164
     165         overriding procedure Assignment_Statement
     166           (Self : in out Visiter;
     167            Node : not null Gela.Elements.Assignment_Statements.
     168              Assignment_Statement_Access);
     169      end Get;
     170
     171      package body Get is
     172
     173         overriding procedure Assignment_Statement
     174           (Self : in out Visiter;
     175            Node : not null Gela.Elements.Assignment_Statements.
     176              Assignment_Statement_Access)
     177         is
     178            X : constant Gela.Elements.Names.Name_Access :=
     179              Node.Assignment_Variable_Name;
     180         begin
     181            Self.Result := Gela.Elements.Element_Access (X);
     182         end Assignment_Statement;
     183      end Get;
     184
     185      V : Get.Visiter;
    132186   begin
    133187      Check_Nil_Element (Statement, "Assignment_Variable_Name");
    134       Raise_Not_Implemented ("");
    135       return Asis.Nil_Element;
     188      Statement.Data.Visit (V);
     189      return (Data => V.Result);
    136190   end Assignment_Variable_Name;
    137191
  • trunk/ada-2012/tests/asis/asis2xml.gpl/list.txt

    r356 r378  
    33./A/A22006D.ADA 2505936391
    44./A/A26007A.ADT 1078513442
     5./A/A27003A.ADA 2988623080
Note: See TracChangeset for help on using the changeset viewer.