Changeset 381


Ignore:
Timestamp:
Jan 8, 2015, 6:22:20 AM (6 years ago)
Author:
Maxim Reznik
Message:

Fix regressions

Add Kind to operator_symbol to distinct interpretation as string_literal.

Location:
trunk/ada-2012/src
Files:
5 edited

Legend:

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

    r380 r381  
    127127Rules for subtype_indication. :
    128128(.
    129       ${subtype_indication.Errors} := ${Subtype_Constraint.Errors};
     129      ${subtype_indication.Errors} := ${Subtype_Constraint.Errors:0};
    130130.)
    131131
    132132Rules for discrete_subtype_indication_dr. :
    133133(.
    134       ${discrete_subtype_indication_dr.Errors} := ${Subtype_Constraint.Errors};
     134      ${discrete_subtype_indication_dr.Errors} := ${Subtype_Constraint.Errors:0};
    135135.)
    136136
  • trunk/ada-2012/src/ag/main.ag.pp

    r346 r381  
    1919      ${root_type_definition.type_kind} := 0;
    2020.)
     21
     22Synthesized attributes
     23  operator_symbol
     24   : Gela.Semantic_Types.Auxiliary_Operator_Kinds : kind;
     25
     26Rules for operator_symbol.operator_symbol_token :
     27(.
     28      --  Depends on ${operator_symbol.Down};
     29      ${operator_symbol.kind} := Gela.Semantic_Types.Is_Operator;
     30.)
     31
     32
  • trunk/ada-2012/src/api/gela-semantic_types.ads

    r370 r381  
    5656      Not_Operator);
    5757
     58   type Auxiliary_Operator_Kinds is (Is_Operator, Is_String);
     59
    5860end Gela.Semantic_Types;
  • trunk/ada-2012/src/parser/gela-fix_node_factories.adb

    r379 r381  
    55with Gela.Elements.Record_Aggregates;
    66with Gela.Elements.Prefixes;
     7with Gela.Semantic_Types;
    78
    89package body Gela.Fix_Node_Factories is
     
    2425               Operator_Symbol_Token));
    2526   begin
    26       Result.Set_Down (0);
     27      Result.Set_Kind (Gela.Semantic_Types.Is_Operator);
    2728
    2829      return Gela.Elements.Operator_Symbols.Operator_Symbol_Access (Result);
  • trunk/ada-2012/src/parser/gela-nodes-fixed_operator_symbols.adb

    r379 r381  
    1 with Gela.Elements.Defining_Names;
    2 with Gela.Interpretations;
     1with Gela.Semantic_Types;
    32
    43package body Gela.Nodes.Fixed_Operator_Symbols is
     
    2423      Visiter : in out Gela.Element_Visiters.Visiter'Class)
    2524   is
    26       use type Gela.Interpretations.Interpretation_Index;
    27 
    28       Name : constant Gela.Elements.Defining_Names.Defining_Name_Access :=
    29         Self.Defining_Name;
    3025   begin
    31       if Self.Down = 0 or else Name.Assigned then
    32          Visiter.Operator_Symbol (Self);
    33       else
    34          Visiter.String_Literal (Self);
    35       end if;
     26      case Self.Kind is
     27         when Gela.Semantic_Types.Is_Operator =>
     28            Visiter.Operator_Symbol (Self);
     29         when Gela.Semantic_Types.Is_String =>
     30            Visiter.String_Literal (Self);
     31      end case;
    3632   end Visit;
    3733
Note: See TracChangeset for help on using the changeset viewer.