diff options
Diffstat (limited to 'src/vhdl/vhdl-nodes.ads')
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 8e20bf830..97e7d706f 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -300,6 +300,15 @@ package Vhdl.Nodes is -- Iir_Kind_String_Literal8 (Short) -- + -- Number of literals in the expanded string. + -- Get/Set_String_Length (Field4) + -- + -- Before analysis, this is the ASCII code of each character in the string. + -- After analysis, this is the position of each literal. + -- Get/Set_String8_Id (Field5) + -- + -- Get/Set_Literal_Length (Field0) + -- -- Used for computed literals. Literal_Origin contains the expression -- whose value was computed during analysis and replaces the expression. -- Get/Set_Literal_Origin (Field2) @@ -309,13 +318,6 @@ package Vhdl.Nodes is -- -- Get/Set_Type (Field1) -- - -- Number of literals in the expanded string. - -- Get/Set_String_Length (Field4) - -- - -- Before analysis, this is the ASCII code of each character in the string. - -- After analysis, this is the position of each literal. - -- Get/Set_String8_Id (Field5) - -- -- Base of the bit_string (corresponds to letters 'b', 'o', 'd' or 'x' in -- the base specifier). -- Get/Set_Bit_String_Base (Flag12,Flag13,Flag14) @@ -337,6 +339,8 @@ package Vhdl.Nodes is -- Get/Set the value of the integer. -- Get/Set_Value (Field4,Field5) -- + -- Get/Set_Literal_Length (Field0) + -- -- Get/Set_Literal_Origin (Field2) -- -- Get/Set_Type (Field1) @@ -348,6 +352,8 @@ package Vhdl.Nodes is -- The value of the literal. -- Get/Set_Fp_Value (Field4,Field5) -- + -- Get/Set_Literal_Length (Field0) + -- -- Get/Set_Literal_Origin (Field2) -- -- Get/Set_Type (Field1) @@ -364,23 +370,25 @@ package Vhdl.Nodes is -- Iir_Kind_Physical_Int_Literal (Short) -- Iir_Kind_Physical_Fp_Literal (Short) -- - -- Get/Set_Literal_Origin (Field2) + -- Only for Iir_Kind_Physical_Int_Literal: + -- The multiplicand. + -- Get/Set_Value (Field4,Field5) + -- + -- Only for Iir_Kind_Physical_Fp_Literal: + -- The multiplicand. + -- Get/Set_Fp_Value (Field4,Field5) -- -- The name of the physical unit. -- Get/Set_Unit_Name (Field3) -- + -- Get/Set_Literal_Length (Field0) + -- + -- Get/Set_Literal_Origin (Field2) + -- -- Get/Set_Type (Field1) -- -- Must be set to locally except for time literal, which is globally. -- Get/Set_Expr_Staticness (State1) - -- - -- Only for Iir_Kind_Physical_Int_Literal: - -- The multiplicand. - -- Get/Set_Value (Field4,Field5) - -- - -- Only for Iir_Kind_Physical_Fp_Literal: - -- The multiplicand. - -- Get/Set_Fp_Value (Field4,Field5) -- Iir_Kind_Simple_Aggregate (Short) -- This node can only be generated by evaluation: it is an unidimentional @@ -6077,6 +6085,12 @@ package Vhdl.Nodes is function Get_Has_Length (Lit : Iir) return Boolean; procedure Set_Has_Length (Lit : Iir; Flag : Boolean); + -- Length of the literal in characters. Used for pretty print. Set to 0 + -- when doesn't come from the sources. + -- Field: Field0 (uc) + function Get_Literal_Length (Lit : Iir) return Int32; + procedure Set_Literal_Length (Lit : Iir; Len : Int32); + -- The origin of a literal can be null_iir for a literal generated by the -- parser, or a node which was statically evaluated to this literal. -- Such nodes are created by eval_expr. |