1
------------------------------------------------------------------------------
3
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
6
-- A S I S . E X P R E S S I O N S --
11
-- This specification is adapted from the Ada Semantic Interface --
12
-- Specification (ASIS) definition, ISO/IEC 15291, Working Draft. In --
13
-- accordance with the (expected) copyright of the ASIS definition, you can --
14
-- freely copy and modify this specification, provided that if you --
15
-- redistribute a modified version, any changes that you have made are --
16
-- clearly indicated. --
18
------------------------------------------------------------------------------
20
-- The content of this specification is taken "as is" from ASIS 2.0.R.
21
-- The code is reformatted to follow the GNAT coding style rules
23
-- Currently Is_Dispatching_Operation function (section 17.40) is commented
24
-- out, because it looks like Asis.Expression is not the right location
25
-- for this function, and it should be moved into Asis.Declarations
27
------------------------------------------------------------------------------
28
-- 17 package Asis.Expressions
29
------------------------------------------------------------------------------
30
------------------------------------------------------------------------------
31
package Asis.Expressions is
32
------------------------------------------------------------------------------
33
------------------------------------------------------------------------------
34
-- Asis.Expressions encapsulates a set of queries that operate on
35
-- An_Expression and An_Association elements.
36
------------------------------------------------------------------------------
37
------------------------------------------------------------------------------
38
-- 17.1 function Corresponding_Expression_Type
39
------------------------------------------------------------------------------
41
function Corresponding_Expression_Type
42
(Expression : in Asis.Expression)
43
return Asis.Declaration;
45
------------------------------------------------------------------------------
46
-- Expression - Specifies the expression to query
48
-- Returns the type declaration for the type or subtype of the expression.
49
-- This query does not "unwind" subtypes or derived types to get to the
50
-- Corresponding_First_Subtype or Corresponding_Parent_Subtype declarations.
51
-- For example, for the following program text:
53
-- type Int is range -5_000 .. 5_000;
54
-- type My_Int is new Int;
55
-- type Good_Int is new My_Int;
58
-- The type declaration for Good_Int should be returned. The "unwinding"
59
-- should not occur. The type declaration for either My_Int or Int should not
62
-- Returns a Nil_Element if the argument Expression does not represent an Ada
63
-- expression having an Ada type, including the following classes:
65
-- - Naming expressions that name packages, subprograms, tasks, etc. These
66
-- expressions do have a Corresponding_Name_Definition and a
67
-- Corresponding_Name_Declaration. Although task objects do have
68
-- a type, this query is limited, on purpose. Thus, when a naming
69
-- expression is given to this query (for packages, subprograms,
70
-- tasks, etc.), this query will return Nil_Element. As the
71
-- Application Note below indicates, if any further information
72
-- is needed, the element should be queried by
73
-- Corresponding_Name_Definition or Corresponding_Name_Declaration,
74
-- which should eventually return an A_Task_Type_Declaration element.
76
-- - When An_Identifier Element representing an attribute designator is
77
-- passed as the actual to this query.
79
-- - The Actual_Parameter Expression from A_Pragma_Argument_Association for a
80
-- Pragma may or may not have a Corresponding_Expression_Type.
82
-- - An_Attribute_Reference Element also may or may not have a
83
-- Corresponding_Expression_Type;
85
-- - An enumeration_aggregate which is a part of
86
-- enumeration_representation_clause.
88
-- Returns a Nil_Element, if statically determinable type of Expression is a
91
-- --|AN Application Note:
93
-- --|AN If the returned declaration is Nil, an application should make its
94
-- --|AN own analysis based on Corresponding_Name_Definition or
95
-- --|AN Corresponding_Name_Declaration to get more information about the
96
-- --|AN argument, including the static type resolution for class-wide
97
-- --|AN expressions, if needed. Use Enclosing_Element to determine if
98
-- --|AN Expression is from pragma argument association. If for such an
99
-- --|AN expression, Corresponding_Name_Definition raises ASIS_Failed (with a
100
-- --|AN Status of Value_Error), this An_Expression element does not represent
101
-- --|AN a normal Ada expression at all and does not follow normal Ada
102
-- --|AN semantic rules.
103
-- --|AN For example, "pragma Private_Part (Open => Yes);", the "Yes"
104
-- --|AN expression may simply be a "keyword" that is specially recognized by
105
-- --|AN the implementor's compilation system and may not refer to any
106
-- --|AN declared object.
108
-- Appropriate Element_Kinds:
111
-- Returns Element_Kinds:
115
-- --|ER An_Integer_Literal - 2.4 - No child elements
116
-- --|ER A_Real_Literal - 2.4 - No child elements
117
-- --|ER A_String_Literal - 2.6 - No child elements
119
-- --|ER A string image returned by:
120
-- --|ER function Value_Image
122
------------------------------------------------------------------------------
123
-- 17.2 function Value_Image
124
------------------------------------------------------------------------------
127
(Expression : in Asis.Expression)
130
------------------------------------------------------------------------------
131
-- Expression - Specifies the expression to query
133
-- Returns the string image of the value of the string, integer, or real
136
-- For string literals, Value will return the quotes around the string
137
-- literal, these quotes are doubled, just as any quote appearing embedded in
138
-- the string literal in the program text.
140
-- The form of numbers returned by this query may vary between implementors.
141
-- Implementors are encouraged, but not required, to return numeric literals
142
-- using the same based or exponent form used in the original compilation
145
-- Appropriate Expression_Kinds:
146
-- An_Integer_Literal
150
------------------------------------------------------------------------------
151
-- --|ER An_Identifier - 4.1 - No child elements
152
-- --|ER An_Operator_Symbol - 4.1 - No child elements
153
-- --|ER A_Character_Literal - 4.1 - No child elements
154
-- --|ER An_Enumeration_Literal - 4.1 - No child elements
156
-- --|ER A string image returned by:
157
-- --|ER function Name
159
-- --|ER Semantic elements returned by:
160
-- --|ER function Corresponding_Name_Definition
161
-- --|ER function Corresponding_Name_Definition_List
162
-- --|ER function Corresponding_Name_Declaration
164
------------------------------------------------------------------------------
165
-- 17.3 function Name_Image
166
------------------------------------------------------------------------------
169
(Expression : in Asis.Expression)
172
------------------------------------------------------------------------------
173
-- Name - Specifies the name to query
175
-- Returns the program text image of the name.
177
-- An_Operator_Symbol elements have names with embedded quotes """abs"""
180
-- A_Character_Literal elements have names with embedded apostrophes "'x'"
183
-- An_Enumeration_Literal and An_Identifier elements have identifier names
184
-- "Blue" (literal Blue) "Abc" (identifier Abc).
186
-- Note: Implicit subtypes that can be encountered while traversing the
187
-- semantic information embedded in implicit inherited subprogram declarations
188
-- (Reference Manual 3.4 (17-22)) could have names that are unique in a
189
-- particular scope. This is because these subtypes are Is_Part_Of_Implicit
190
-- declarations that do not form part of the physical text of the original
191
-- compilation units. Some applications may wish to carefully separate the
192
-- names of declarations from the names of Is_Part_Of_Implicit declaration
193
-- when creating symbol tables and other name-specific lookup mechanisms.
195
-- The case of names returned by this query may vary between implementors.
196
-- Implementors are encouraged, but not required, to return names in the
197
-- same case as was used in the original compilation text.
199
-- Appropriate Expression_Kinds:
201
-- An_Operator_Symbol
202
-- A_Character_Literal
203
-- An_Enumeration_Literal
205
------------------------------------------------------------------------------
206
-- 17.4 function References
207
------------------------------------------------------------------------------
210
(Name : in Asis.Element;
211
Within_Element : in Asis.Element;
212
Implicitly : in Boolean := False)
213
return Asis.Name_List;
215
------------------------------------------------------------------------------
216
-- Name - Specifies the entity to query
217
-- Within_Element - Specifies the limits for the query which is limited
218
-- to the Element and its children.
220
-- If the Implicitly argument is True:
221
-- Returns all usage references of the given entity made by both explicit
222
-- and implicit elements within the given limits.
224
-- If the Implicitly argument is False:
225
-- Returns all usage references of the given entity made only by explicit
226
-- elements within the given limits.
228
-- Returned references are in their order of appearance.
230
-- Appropriate Element_Kinds:
232
-- Returns Element_Kinds:
235
-- May raise ASIS_Failed with a Status of Obsolete_Reference_Error if the
236
-- argument is part of an inconsistent compilation unit.
238
------------------------------------------------------------------------------
239
-- 17.5 function Is_Referenced
240
------------------------------------------------------------------------------
242
function Is_Referenced
243
(Name : in Asis.Element;
244
Within_Element : in Asis.Element;
245
Implicitly : in Boolean := False)
248
------------------------------------------------------------------------------
249
-- Name - Specifies the entity to query
250
-- Within_Element - Specifies the limits for the query which is limited
251
-- to the Element and its children.
254
-- If the Implicitly argument is True:
255
-- Returns True if the Name is referenced by either implicit or explicit
256
-- elements within the given limits.
258
-- If the Implicitly argument is False:
259
-- Returns True only if the Name is referenced by explicit elements.
261
-- Returns False for any unexpected Element.
263
-- Expected Element_Kinds:
266
-- May raise ASIS_Failed with a Status of Obsolete_Reference_Error if the
267
-- argument is part of an inconsistent compilation unit.
269
------------------------------------------------------------------------------
270
-- 17.6 function Corresponding_Name_Definition
271
------------------------------------------------------------------------------
273
function Corresponding_Name_Definition
274
(Reference : in Asis.Expression)
275
return Asis.Defining_Name;
277
------------------------------------------------------------------------------
278
-- Reference - Specifies an expression to query
280
-- Returns the defining_identifier, defining_character_literal,
281
-- defining_operator_symbol, or defining_program_unit_name from the
282
-- declaration of the referenced entity.
284
-- - Record component references return the defining name of the
285
-- record discriminant or component_declaration. For references to
286
-- inherited declarations of derived types, the
287
-- Corresponding_Name_Definition returns
288
-- the defining name of the implicit inherited declaration.
290
-- - References to implicit operators and inherited subprograms will return
291
-- an Is_Part_Of_Implicit defining name for the operation. The
292
-- Enclosing_Element of the name is an implicit declaration for the
293
-- operation. The Enclosing_Element of the declaration is the associated
294
-- derived_type_definition.
296
-- - References to formal parameters given in calls to inherited subprograms
297
-- will return an Is_Part_Of_Implicit defining name for the
298
-- Parameter_Specification from the inherited subprogram specification.
300
-- - References to visible components of instantiated generic packages will
301
-- return a name from the expanded generic specification instance.
303
-- - References, within expanded generic instances, that refer to other
304
-- components of the same, or an enclosing, expanded generic instance,
305
-- return a name from the appropriate expanded specification or body
308
-- In case of renaming, the function returns the new name for the entity.
310
-- Returns a Nil_Element if the reference is to an implicitly declared
311
-- element for which the implementation does not provide declarations and
312
-- defining name elements.
314
-- Returns a Nil_Element if the argument is a dispatching call.
316
-- The Enclosing_Element of a non-Nil result is either a Declaration or a
319
-- Appropriate Expression_Kinds:
321
-- An_Operator_Symbol
322
-- A_Character_Literal
323
-- An_Enumeration_Literal
325
-- Returns Element_Kinds:
329
-- --|IP Implementation Permissions:
331
-- --|IP An implementation may choose to return any part of multi-part
332
-- --|IP declarations and definitions. Multi-part declaration/definitions
333
-- --|IP can occur for:
335
-- --|IP - Subprogram specification in package specification, package body,
336
-- --|IP and subunits (is separate);
337
-- --|IP - Entries in package specification, package body, and subunits
338
-- --|IP (is separate);
339
-- --|IP - Private type and full type declarations;
340
-- --|IP - Incomplete type and full type declarations; and
341
-- --|IP - Deferred constant and full constant declarations.
343
-- --|IP No guarantee is made that the element will be the first part or
344
-- --|IP that the determination will be made due to any visibility rules.
345
-- --|IP An application should make its own analysis for each case based
346
-- --|IP on which part is returned.
348
-- --|IP Some implementations do not represent all forms of implicit
349
-- --|IP declarations such that elements representing them can be easily
350
-- --|IP provided. An implementation can choose whether or not to construct
351
-- --|IP and provide artificial declarations for implicitly declared elements.
353
-- --|IR Implementation Requirements:
355
-- Raises ASIS_Inappropriate_Element, with a Status of Value_Error, if passed
356
-- a reference that does not have a declaration:
358
-- - a reference to an attribute_designator. Attributes are defined, but
359
-- have no implicit or explicit declarations;
361
-- - an identifier which syntactically is placed before "=>" in a
362
-- pragma_argument_association which has the form of a named association;
363
-- such an identifier can never have a declaration;
365
-- - an identifier specific to a pragma (Reference Manual, 2.8(10));
367
-- pragma Should_I_Check ( Really => Yes );
369
-- In this example, both the names Really and Yes have no declaration.
371
-- Raises ASIS_Inappropriate_Element, with a Status of Value_Error, if passed
372
-- a portion of a pragma that was "ignored" by the compiler and which does
373
-- not have (sufficient) semantic information for a proper return result
374
-- to be computed. For example,
376
-- pragma I_Am_Ignored (Foof);
378
-- The "Foof" expression is An_Identifier but raises this exception
379
-- if passed to Corresponding_Name_Definition if the pragma was ignored
382
-- Raises ASIS_Inappropriate_Element, with a Status of Value_Error, if passed
383
-- a portion of a pragma that is an ambiguous reference to more than one
384
-- entity. For example,
386
-- pragma Inline ("+"); -- Inlines all "+" operators
388
-- The "+" expression is An_Operator_Symbol but raises this
389
-- exception if it referenced more than one "+" operator. In this
390
-- case, the Corresponding_Name_Definition_List query can be used to obtain a
391
-- list of referenced entities.
393
------------------------------------------------------------------------------
394
-- 17.7 function Corresponding_Name_Definition_List
395
------------------------------------------------------------------------------
397
function Corresponding_Name_Definition_List
398
(Reference : in Asis.Element)
399
return Asis.Defining_Name_List;
401
------------------------------------------------------------------------------
402
-- Reference - Specifies an entity reference to query
404
-- Exactly like Corresponding_Name_Definition except it returns a list.
405
-- The list will almost always have a length of one. The exception to this
406
-- is the case where an expression in a pragma is ambiguous and reference
407
-- more than one entity. For example,
409
-- pragma Inline ("+"); -- Inlines all "+" operators
411
-- The "+" expression is An_Operator_Symbol but could reference more
412
-- than one "+" operator. In this case, the resulting list includes all
413
-- referenced entities.
415
-- Appropriate Expression_Kinds:
417
-- An_Operator_Symbol
418
-- A_Character_Literal
419
-- An_Enumeration_Literal
421
-- Returns Element_Kinds:
424
------------------------------------------------------------------------------
425
-- 17.8 function Corresponding_Name_Declaration
426
------------------------------------------------------------------------------
428
function Corresponding_Name_Declaration
429
(Reference : in Asis.Expression)
432
------------------------------------------------------------------------------
433
-- Reference - Specifies the entity reference to query
435
-- Returns the declaration that declared the entity named by the given
436
-- reference. The result is exactly the same as:
438
-- Result := Corresponding_Name_Definition (Reference);
439
-- if not Is_Nil (Result) then
440
-- Result := Enclosing_Element (Result);
444
-- See the comments for Corresponding_Name_Definition for details.
445
-- The result is either a Declaration or a Statement. Statements result
446
-- from references to statement labels, loop identifiers, and block
449
-- Appropriate Element_Kinds:
452
-- Appropriate Expression_Kinds:
454
-- An_Operator_Symbol
455
-- A_Character_Literal
456
-- An_Enumeration_Literal
458
-- Returns Element_Kinds:
462
-- Predefined types, exceptions, operators in package Standard can be
463
-- checked by testing that the enclosing Compilation_Unit is standard.
464
-- --|ER---------------------------------------------------------------------
465
-- --|ER An_Explicit_Dereference - 4.1
467
-- --|CR Child elements returned by:
468
-- --|CR function Prefix
472
------------------------------------------------------------------------------
473
-- 17.9 function Prefix
474
------------------------------------------------------------------------------
476
function Prefix (Expression : in Asis.Expression) return Asis.Expression;
478
------------------------------------------------------------------------------
479
-- Expression - Specifies the name expression to query
481
-- Returns the prefix (the construct to the left of: the rightmost unnested
482
-- left parenthesis in function_call elements and indexed_component elements
483
-- or slice elements, the rightmost 'dot' for selected_component elements, or
484
-- the rightmost tick for attribute_reference elements).
486
-- Returns the operator_symbol for infix operator function calls. The infix
487
-- form A + B is equivalent to the prefix form "+"(A, B).
489
-- Appropriate Expression_Kinds:
490
-- An_Explicit_Dereference P.ALL
491
-- An_Attribute_Reference Priv'Base'First
492
-- A_Function_Call Abc(...) or Integer'Image(...)
493
-- An_Indexed_Component An_Array(3)
494
-- A_Selected_Component A.B.C
495
-- A_Slice An_Array(3 .. 5)
497
-- Returns Expression_Kinds:
500
-- --|ER---------------------------------------------------------------------
501
-- --|ER An_Indexed_Component - 4.1.1
504
-- --|CR Child elements returned by:
505
-- --|CR function Prefix
506
-- --|CR function Index_Expressions
509
------------------------------------------------------------------------------
510
-- 17.10 function Index_Expressions
511
------------------------------------------------------------------------------
513
function Index_Expressions
514
(Expression : in Asis.Expression)
515
return Asis.Expression_List;
517
------------------------------------------------------------------------------
518
-- Expression - Specifies an indexed_component to query
520
-- Returns the list of expressions (possibly only one) within the parenthesis,
521
-- in their order of appearance.
523
-- Appropriate Expression_Kinds:
524
-- An_Indexed_Component
526
-- Returns Element_Kinds:
529
-- --|ER---------------------------------------------------------------------
530
-- --|ER A_Slice - 4.1.2
532
-- --|CR Child elements returned by:
533
-- --|CR function Prefix
534
-- --|CR function Slice_Range
538
------------------------------------------------------------------------------
539
-- 17.11 function Slice_Range
540
------------------------------------------------------------------------------
543
(Expression : in Asis.Expression)
544
return Asis.Discrete_Range;
546
------------------------------------------------------------------------------
547
-- Expression - Specifies the slice to query
549
-- Returns the discrete range of the slice.
551
-- Appropriate Expression_Kinds:
554
-- Returns Definition_Kinds:
557
------------------------------------------------------------------------------
558
-- 17.12 function Selector
559
------------------------------------------------------------------------------
561
function Selector (Expression : in Asis.Expression) return Asis.Expression;
563
------------------------------------------------------------------------------
564
-- Expression - Specifies the selected_component to query
566
-- Returns the selector (the construct to the right of the rightmost 'dot' in
567
-- the selected_component).
569
-- Appropriate Expression_Kinds:
570
-- A_Selected_Component
572
-- Returns Expression_Kinds:
574
-- An_Operator_Symbol
575
-- A_Character_Literal
576
-- An_Enumeration_Literal
578
------------------------------------------------------------------------------
579
-- 17.13 function Attribute_Designator_Identifier
580
------------------------------------------------------------------------------
582
function Attribute_Designator_Identifier
583
(Expression : in Asis.Expression)
584
return Asis.Expression;
586
------------------------------------------------------------------------------
587
-- Expression - Specifies an attribute_reference expression to query
589
-- Returns the identifier of the attribute_designator (the construct to the
590
-- right of the rightmost tick of the attribute_reference). The Prefix of
591
-- the attribute_reference can itself be an attribute_reference as in
592
-- T'BASE'FIRST where the prefix is T'BASE and the attribute_designator name
595
-- Attribute_designator reserved words "access", "delta", and "digits" are
596
-- treated as An_Identifier.
598
-- Appropriate Expression_Kinds:
599
-- An_Attribute_Reference
601
-- Returns Expression_Kinds:
605
------------------------------------------------------------------------------
606
-- 17.14 function Attribute_Designator_Expressions
607
------------------------------------------------------------------------------
609
function Attribute_Designator_Expressions
610
(Expression : in Asis.Expression)
611
return Asis.Expression_List;
613
------------------------------------------------------------------------------
614
-- Expression - Specifies an attribute expression to query
616
-- Returns the static expressions associated with the optional argument of the
617
-- attribute_designator. Expected predefined attributes are A'First(N),
618
-- A'Last(N), A'Length(N), and A'Range(N).
620
-- Returns a Nil_Element_List if there are no arguments.
622
-- Appropriate Expression_Kinds:
623
-- An_Attribute_Reference
624
-- Appropriate Attribute_Kinds:
627
-- A_Length_Attribute
629
-- An_Implementation_Defined_Attribute
630
-- An_Unknown_Attribute
632
-- Returns Element_Kinds:
635
-- --|IP Implementation Permissions:
637
-- --|IP This query returns a list to support implementation-defined
638
-- --|IP attributes that may have more than one static_expression.
640
------------------------------------------------------------------------------
641
-- 17.15 function Record_Component_Associations
642
------------------------------------------------------------------------------
644
function Record_Component_Associations
645
(Expression : in Asis.Expression;
646
Normalized : in Boolean := False)
647
return Asis.Association_List;
649
------------------------------------------------------------------------------
650
-- Expression - Specifies an aggregate expression to query
651
-- Normalized - Specifies whether the normalized form is desired
653
-- Returns a list of the record_component_association elements of a
654
-- record_aggregate or an extension_aggregate.
656
-- Returns a Nil_Element_List if the aggregate is of the form (null record).
658
-- An unnormalized list contains all needed associations ordered as they
659
-- appear in the program text. Each unnormalized association has an optional
660
-- list of discriminant_selector_name elements, and an explicit expression.
662
-- A normalized list contains artificial associations representing all
663
-- needed components in an order matching the declaration order of the
664
-- needed components.
666
-- Each normalized association represents a one on one mapping of a
667
-- component to the explicit expression. A normalized association has one
668
-- A_Defining_Name component that denotes the discriminant_specification or
669
-- component_declaration, and one An_Expression component that is the
672
-- Appropriate Expression_Kinds:
673
-- A_Record_Aggregate
674
-- An_Extension_Aggregate
676
-- Returns Association_Kinds:
677
-- A_Record_Component_Association
679
-- --|IR Implementation Requirements:
681
-- --|IR Normalized associations are Is_Normalized and Is_Part_Of_Implicit.
682
-- --|IR Normalized associations are never Is_Equal to unnormalized
683
-- --|IR associations.
685
-- --|IP Implementation Permissions:
687
-- --|IP An implementation may choose to normalize its internal representation
688
-- --|IP to use the defining_identifier element instead of the
689
-- --|IP component_selector_name element.
691
-- --|IP If so, this query will return Is_Normalized associations even if
692
-- --|IP Normalized is False, and the query
693
-- --|IP Record_Component_Associations_Normalized will return True.
695
------------------------------------------------------------------------------
696
-- 17.16 function Extension_Aggregate_Expression
697
------------------------------------------------------------------------------
699
function Extension_Aggregate_Expression
700
(Expression : in Asis.Expression)
701
return Asis.Expression;
703
------------------------------------------------------------------------------
704
-- Expression - Specifies an extension_aggregate expression to query
706
-- Returns the ancestor_part expression preceding the reserved word with in
707
-- the extension_aggregate.
709
-- Appropriate Expression_Kinds:
710
-- An_Extension_Aggregate
712
-- Returns Element_Kinds:
715
------------------------------------------------------------------------------
716
-- 17.17 function Array_Component_Associations
717
------------------------------------------------------------------------------
719
function Array_Component_Associations
720
(Expression : in Asis.Expression)
721
return Asis.Association_List;
723
------------------------------------------------------------------------------
724
-- Expression - Specifies an array aggregate expression to query
726
-- Returns a list of the Array_Component_Associations in an array aggregate.
728
-- Appropriate Expression_Kinds:
729
-- A_Positional_Array_Aggregate
730
-- A_Named_Array_Aggregate
732
-- Returns Association_Kinds:
733
-- An_Array_Component_Association
735
-- --|AN Application Note:
737
-- --|AN While positional_array_aggregate elements do not have
738
-- --|AN array_component_association elements defined by Ada syntax, ASIS
739
-- --|AN treats A_Positional_Array_Aggregate as if it were
740
-- --|AN A_Named_Array_Aggregate. The An_Array_Component_Association elements
741
-- --|AN returned will have Array_Component_Choices that are a
742
-- --|AN Nil_Element_List for all positional expressions except an others
746
------------------------------------------------------------------------------
747
-- 17.18 function Array_Component_Choices
748
------------------------------------------------------------------------------
750
function Array_Component_Choices
751
(Association : in Asis.Association)
752
return Asis.Expression_List;
754
------------------------------------------------------------------------------
755
-- Association - Specifies the component association to query
757
-- If the Association is from a named_array_aggregate:
759
-- Returns the discrete_choice_list order of appearance. The choices are
760
-- either An_Expression or A_Discrete_Range elements, or a single
761
-- An_Others_Choice element.
763
-- If the Association is from a positional_array_aggregate:
765
-- Returns a single An_Others_Choice if the association is an others
766
-- choice (others => expression).
768
-- Returns a Nil_Element_List otherwise.
770
-- Appropriate Association_Kinds:
771
-- An_Array_Component_Association
773
-- Returns Element_Kinds:
777
-- Returns Definition_Kinds:
781
------------------------------------------------------------------------------
782
-- 17.19 function Record_Component_Choices
783
------------------------------------------------------------------------------
785
function Record_Component_Choices
786
(Association : in Asis.Association)
787
return Asis.Expression_List;
789
------------------------------------------------------------------------------
790
-- Association - Specifies the component association to query
792
-- If the Association argument is from an unnormalized list:
794
-- - If the Association is a named component association:
796
-- Returns the component_choice_list order of appearance. The choices are
797
-- either An_Identifier elements representing component_selector_name
798
-- elements, or a single An_Others_Choice element.
800
-- The Enclosing_Element of the choices is the Association argument.
802
-- - If the Association is a positional component association:
804
-- Returns a Nil_Element_List.
806
-- If the Association argument is from a Normalized list:
808
-- Returns a list containing a single choice:
810
-- - A_Defining_Name element representing the defining_identifier of
811
-- the component_declaration.
813
-- The Enclosing_Element of the A_Defining_Name is the
814
-- component_declaration.
816
-- Normalized lists contain artificial ASIS An_Association elements that
817
-- provide one formal A_Defining_Name => An_Expression pair per
818
-- association. These artificial associations are Is_Normalized. Their
819
-- component A_Defining_Name is not Is_Normalized.
821
-- Appropriate Association_Kinds:
822
-- A_Record_Component_Association
824
-- Returns Element_Kinds:
825
-- A_Defining_Name -- Is_Normalized(Association)
826
-- An_Expression -- not Is_Normalized(Association)
827
-- Returns Expression_Kinds:
830
-- Returns Definition_Kinds:
833
------------------------------------------------------------------------------
834
-- 17.20 function Component_Expression
835
------------------------------------------------------------------------------
837
function Component_Expression
838
(Association : in Asis.Association)
839
return Asis.Expression;
841
------------------------------------------------------------------------------
842
-- Association - Specifies the component association to query
844
-- Returns the expression of the record_component_association or
845
-- array_component_association.
847
-- The Enclosing_Element of the expression is the Association argument.
849
-- Normalized lists contain artificial ASIS An_Association elements that
850
-- provide one formal A_Defining_Name => An_Expression pair per
851
-- association. These artificial associations are Is_Normalized. Their
852
-- component An_Expression elements are not Is_Normalized.
854
-- Appropriate Association_Kinds:
855
-- A_Record_Component_Association
856
-- An_Array_Component_Association
858
-- Returns Element_Kinds:
861
------------------------------------------------------------------------------
862
-- 17.21 function Formal_Parameter
863
------------------------------------------------------------------------------
865
function Formal_Parameter
866
(Association : in Asis.Association)
869
------------------------------------------------------------------------------
870
-- Association - Specifies the association to query
872
-- If the Association argument is from an unnormalized list:
874
-- - If the Association is given in named notation:
876
-- Returns An_Identifier representing the formal_parameter_selector_name,
877
-- generic_formal_parameter_selector_name, or pragma_argument_identifier.
879
-- The Enclosing_Element of the An_Identifier element is the Association
882
-- - If the Association is given in positional notation:
884
-- Returns a Nil_Element.
886
-- If the Association argument is from a Normalized list:
888
-- - Returns A_Defining_Name representing the defining_identifier of the
889
-- parameter_specification or generic_formal_parameter_declaration.
890
-- Pragma_argument_association elements are not available in normalized
893
-- - The Enclosing_Element of the A_Defining_Name is the
894
-- parameter_specification or generic_formal_parameter_declaration element.
896
-- Normalized lists contain artificial ASIS An_Association elements that
897
-- provide one formal A_Defining_Name => An_Expression pair per
898
-- association. These artificial associations are Is_Normalized. Their
899
-- component A_Defining_Name elements are not Is_Normalized.
901
-- Appropriate Association_Kinds:
902
-- A_Parameter_Association
903
-- A_Generic_Association
904
-- A_Pragma_Argument_Association
906
-- Returns Element_Kinds:
908
-- An_Operator_Symbol
909
-- A_Defining_Name -- Is_Normalized(Association)
910
-- An_Expression -- not Is_Normalized(Association)
911
-- Returns Expression_Kinds:
914
------------------------------------------------------------------------------
915
-- 17.22 function Actual_Parameter
916
------------------------------------------------------------------------------
918
function Actual_Parameter
919
(Association : in Asis.Association)
920
return Asis.Expression;
922
------------------------------------------------------------------------------
923
-- Association - Specifies the association to query
925
-- If the Association argument is from an unnormalized list:
927
-- Returns An_Expression representing:
929
-- - the explicit_actual_parameter of a parameter_association.
931
-- - the explicit_generic_actual_parameter of a generic_association.
933
-- - the name or expression of a pragma_argument_association.
935
-- The Enclosing_Element of An_Expression is the Association argument.
937
-- If the Association argument is from a Normalized list:
939
-- - If the Association is given explicitly:
941
-- Returns An_Expression representing:
943
-- - the explicit_actual_parameter of a parameter_association.
945
-- - the explicit_generic_actual_parameter of a generic_association.
947
-- The Enclosing_Element of An_Expression is the Association argument.
949
-- - If the Association is given by default:
951
-- Returns An_Expression representing:
953
-- - the corresponding default_expression of the Is_Normalized
954
-- A_Parameter_Association.
956
-- - the corresponding default_expression or default_name of the
957
-- Is_Normalized A_Generic_Association.
959
-- - The Enclosing_Element of the An_Expression element is the
960
-- parameter_specification or generic_formal_parameter_declaration that
961
-- contains the default_expression or default_name, except for the case
962
-- when this An_Expression element is an implicit naming expression
963
-- representing the actual subprogram selected at the place of the
964
-- instantiation for A_Box_Default. In the latter case, the
965
-- Enclosing_Element for such An_Expression is the instantiation.
967
-- Normalized lists contain artificial ASIS An_Association elements that
968
-- provide one formal A_Defining_Name => An_Expression pair per
969
-- association. These artificial associations are Is_Normalized.
970
-- Artificial associations of default associations are
971
-- Is_Defaulted_Association. Their component An_Expression elements are
972
-- not Is_Normalized and are not Is_Defaulted_Association.
974
-- If the argument is A_Pragma_Argument_Association, then this function may
975
-- return any expression to support implementation-defined pragmas.
977
-- Appropriate Association_Kinds:
978
-- A_Parameter_Association
979
-- A_Generic_Association
980
-- A_Pragma_Argument_Association
982
-- Returns Element_Kinds:
985
------------------------------------------------------------------------------
986
-- 17.23 function Discriminant_Selector_Names
987
------------------------------------------------------------------------------
989
function Discriminant_Selector_Names
990
(Association : in Asis.Discriminant_Association)
991
return Asis.Expression_List;
993
------------------------------------------------------------------------------
994
-- Association - Specifies the discriminant association to query
996
-- If the Association argument is from an unnormalized list:
998
-- - If the Association is a named discriminant_association:
1000
-- Returns a list of the An_Identifier discriminant_selector_name elements
1001
-- in order of appearance.
1003
-- The Enclosing_Element of the names is the Association argument.
1005
-- - If the Association is a positional discriminant_association:
1007
-- Returns a Nil_Element_List.
1009
-- If the Association argument is from a Normalized list:
1011
-- Returns a list containing a single A_Defining_Name element representing
1012
-- the defining_identifier of the discriminant_specification.
1014
-- The Enclosing_Element of the A_Defining_Name is the
1015
-- discriminant_specification.
1017
-- Normalized lists contain artificial ASIS An_Association elements that
1018
-- provide one formal A_Defining_Name => An_Expression pair per
1019
-- association. These artificial associations are Is_Normalized. Their
1020
-- component A_Defining_Name elements are not Is_Normalized.
1022
-- Appropriate Association_Kinds:
1023
-- A_Discriminant_Association
1025
-- Returns Element_Kinds:
1026
-- A_Defining_Name -- Is_Normalized(Association)
1027
-- An_Expression -- not Is_Normalized(Association)
1028
-- Returns Expression_Kinds:
1032
------------------------------------------------------------------------------
1033
-- 17.24 function Discriminant_Expression
1034
------------------------------------------------------------------------------
1036
function Discriminant_Expression
1037
(Association : in Asis.Discriminant_Association)
1038
return Asis.Expression;
1040
------------------------------------------------------------------------------
1041
-- Association - Specifies the discriminant_association to query
1043
-- If the Association argument is from an unnormalized list:
1045
-- Returns An_Expression representing the expression of the
1046
-- discriminant_association.
1048
-- The Enclosing_Element of An_Expression is the Association argument.
1050
-- If the Association argument is from a Normalized list:
1052
-- - If the Association is given explicitly:
1054
-- Returns An_Expression representing the expression of the
1055
-- discriminant_association.
1057
-- The Enclosing_Element of An_Expression is the Association argument.
1059
-- - If the Association is given by default:
1061
-- Returns An_Expression representing:
1063
-- - the corresponding default_expression of the Is_Normalized
1064
-- A_Discriminant_Association.
1066
-- - The Enclosing_Element of the An_Expression element is the
1067
-- discriminant_specification that contains the default_expression.
1069
-- Normalized lists contain artificial ASIS An_Association elements that
1070
-- provide one formal A_Defining_Name => An_Expression pair per
1071
-- association. These artificial associations are Is_Normalized.
1072
-- Artificial associations of default associations are
1073
-- Is_Defaulted_Association. Their component An_Expression elements are
1074
-- not Is_Normalized and are not Is_Defaulted_Association.
1076
-- Appropriate Association_Kinds:
1077
-- A_Discriminant_Association
1079
-- Returns Element_Kinds:
1082
------------------------------------------------------------------------------
1083
-- 17.25 function Is_Normalized
1084
------------------------------------------------------------------------------
1086
function Is_Normalized (Association : in Asis.Association) return Boolean;
1088
------------------------------------------------------------------------------
1089
-- Association - Specifies the association to query
1091
-- Returns True if the association is a normalized, artificially created
1092
-- association returned by the queries Discriminant_Associations,
1093
-- Generic_Actual_Part, Call_Statement_Parameters,
1094
-- Record_Component_Associations, or Function_Call_Parameters where
1095
-- Normalized => True (or the operation returns Is_Normalized associations
1096
-- even if Normalized => False). See the Implementation Permissions for
1099
-- Returns False for any unexpected Element.
1102
-- Expected Association_Kinds:
1103
-- A_Discriminant_Association
1104
-- A_Record_Component_Association
1105
-- A_Parameter_Association
1106
-- A_Generic_Association
1108
------------------------------------------------------------------------------
1109
-- 17.26 function Is_Defaulted_Association
1110
------------------------------------------------------------------------------
1112
function Is_Defaulted_Association
1113
(Association : in Asis.Association)
1116
------------------------------------------------------------------------------
1117
-- Association - Specifies the association to query
1119
-- Returns True if the association is a normalized, artificially created
1120
-- association returned by the queries Discriminant_Associations,
1121
-- Generic_Actual_Part, Record_Component_Associations,
1122
-- Call_Statement_Parameters, or Function_Call_Parameters where
1123
-- Normalized => True (or the operation returns default associations even if
1124
-- Normalized => False) and the association contains a default expression.
1125
-- A default expression is one that is implicitly supplied by the language
1126
-- semantics and that was not explicitly supplied (typed) by the user.
1128
-- Returns False for any unexpected Element.
1130
-- Expected Association_Kinds:
1131
-- A_Parameter_Association
1132
-- A_Generic_Association
1134
-- --|AN Note: Always returns False for discriminant associations. Defaulted
1135
-- --|AN discriminant associations occur only when the discriminant constraint
1136
-- --|AN is completely missing from a subtype indication. Consequently, it is
1137
-- --|AN not possible to obtain a (normalized) discriminant constraint list
1138
-- --|AN for such subtype indications. Always returns False for component
1139
-- --|AN associations. Aggregates cannot have defaulted components.
1141
------------------------------------------------------------------------------
1142
-- 17.27 function Expression_Parenthesized
1143
------------------------------------------------------------------------------
1145
function Expression_Parenthesized
1146
(Expression : in Asis.Expression)
1147
return Asis.Expression;
1149
------------------------------------------------------------------------------
1150
-- Expression - Specifies the parenthesized expression to query
1152
-- Returns the expression within the parenthesis. This operation unwinds only
1153
-- one set of parenthesis at a time, so the result may itself be
1154
-- A_Parenthesized_Expression.
1156
-- A_Parenthesized_Expression kind corresponds only to the (expression)
1157
-- alternative in the syntax notion of primary in Reference Manual 4.4. For
1158
-- example, an expression of a type_conversion is A_Parenthesized_Expression
1159
-- only if it is similar to the form subtype_mark((expression)) where it has
1160
-- at least one set of its own parenthesis.
1162
-- Appropriate Expression_Kinds:
1163
-- A_Parenthesized_Expression
1165
-- Returns Element_Kinds:
1169
------------------------------------------------------------------------------
1170
-- 17.28 function Is_Prefix_Call
1171
------------------------------------------------------------------------------
1173
function Is_Prefix_Call (Expression : in Asis.Expression) return Boolean;
1175
------------------------------------------------------------------------------
1176
-- Expression - Specifies the function call expression to query
1178
-- Returns True if the function call is in prefix form.
1180
-- Returns False for any unexpected Element.
1182
-- For example, - Foo (A, B); -- Returns TRUE
1183
-- "<" (A, B); -- Returns TRUE
1184
-- ... A < B ... -- Returns FALSE
1186
-- Expected Expression_Kinds:
1189
------------------------------------------------------------------------------
1190
-- 17.29 function Corresponding_Called_Function
1191
------------------------------------------------------------------------------
1193
function Corresponding_Called_Function
1194
(Expression : in Asis.Expression)
1195
return Asis.Declaration;
1197
------------------------------------------------------------------------------
1198
-- Expression - Specifies the function_call to query
1200
-- Returns the declaration of the called function.
1202
-- Returns a Nil_Element if the:
1204
-- - function_prefix denotes a predefined operator for which the
1205
-- implementation does not provide an artificial function declaration,
1207
-- - prefix of the call denotes an access to a function implicit or explicit
1210
-- - argument is a dispatching call.
1212
-- If function_prefix denotes an attribute_reference, and if the corresponding
1213
-- attribute is (re)defined by an attribute definition clause, an
1214
-- implementation is encouraged, but not required, to return the definition
1215
-- of the corresponding subprogram whose name is used after "use" in this
1216
-- attribute definition clause. If an implementation cannot return such a
1217
-- subprogram definition, a Nil_Element should be returned. For an attribute
1218
-- reference which is not (re)defined by an attribute definition clause, a
1219
-- Nil_Element should be returned.
1221
-- Appropriate Expression_Kinds:
1224
-- Returns Declaration_Kinds:
1225
-- Not_A_Declaration
1226
-- A_Function_Declaration
1227
-- A_Function_Body_Declaration
1228
-- A_Function_Body_Stub
1229
-- A_Function_Renaming_Declaration
1230
-- A_Function_Instantiation
1231
-- A_Formal_Function_Declaration
1232
-- A_Generic_Function_Declaration
1234
-- --|IP Implementation Permissions:
1236
-- --|IP An implementation may choose to return any part of multi-part
1237
-- --|IP declarations and definitions. Multi-part declaration/definitions
1238
-- --|IP can occur for:
1240
-- --|IP - Subprogram specification in package specification, package body,
1241
-- --|IP and subunits (is separate);
1242
-- --|IP - Entries in package specification, package body, and subunits
1243
-- --|IP (is separate);
1244
-- --|IP - Private type and full type declarations;
1245
-- --|IP - Incomplete type and full type declarations; and
1246
-- --|IP - Deferred constant and full constant declarations.
1248
-- --|IP No guarantee is made that the element will be the first part or
1249
-- --|IP that the determination will be made due to any visibility rules.
1250
-- --|IP An application should make its own analysis for each case based
1251
-- --|IP on which part is returned.
1253
-- --|IP An implementation can choose whether or not to construct and provide
1254
-- --|IP artificial implicit declarations for predefined operators.
1256
------------------------------------------------------------------------------
1257
-- 17.30 function Function_Call_Parameters
1258
------------------------------------------------------------------------------
1260
function Function_Call_Parameters
1261
(Expression : in Asis.Expression;
1262
Normalized : in Boolean := False)
1263
return Asis.Association_List;
1265
------------------------------------------------------------------------------
1266
-- Expression - Specifies the function call expression to query
1267
-- Normalized - Specifies whether the normalized form is desired
1269
-- Returns a list of parameter_association elements of the call.
1271
-- Returns a Nil_Element_List if there are no parameter_association elements.
1273
-- An unnormalized list contains only explicit associations ordered as they
1274
-- appear in the program text. Each unnormalized association has an optional
1275
-- formal_parameter_selector_name and an explicit_actual_parameter component.
1277
-- A normalized list contains artificial associations representing all
1278
-- explicit and default associations. It has a length equal to the number of
1279
-- parameter_specification elements of the formal_part of the
1280
-- parameter_and_result_profile. The order of normalized associations matches
1281
-- the order of parameter_specification elements.
1283
-- Each normalized association represents a one on one mapping of a
1284
-- parameter_specification elements to the explicit or default expression.
1285
-- A normalized association has one A_Defining_Name component that denotes the
1286
-- parameter_specification, and one An_Expression component that is either the
1287
-- explicit_actual_parameter or a default_expression.
1289
-- If the prefix of the call denotes an access to a function implicit or
1290
-- explicit deference, normalized associations are constructed on the basis
1291
-- of the formal_part of the parameter_and_result_profile from the
1292
-- corresponding access_to_subprogram definition.
1294
-- Returns Nil_Element for normalized associations in the case where
1295
-- the called function can be determined only dynamically (dispatching
1296
-- calls). ASIS cannot produce any meaningful result in this case.
1298
-- The exception ASIS_Inappropriate_Element is raised when the function
1299
-- call is an attribute reference and Is_Normalized is True.
1301
-- Appropriate Expression_Kinds:
1304
-- Returns Element_Kinds:
1305
-- A_Parameter_Association
1307
-- --|IR Implementation Requirements:
1309
-- --|IR Normalized associations are Is_Normalized and Is_Part_Of_Implicit.
1310
-- --|IR Normalized associations provided by default are
1311
-- --|AN Is_Defaulted_Association. Normalized associations are never Is_Equal
1312
-- --|AN to unnormalized associations.
1314
-- --|IP Implementation Permissions:
1316
-- --|IP An implementation may choose to always include default parameters in
1317
-- --|IP its internal representation.
1319
-- --|IP An implementation may also choose to normalize its representation
1320
-- --|IP to use defining_identifier elements rather than
1321
-- --|IP formal_parameter_selector_name elements.
1323
-- --|IP In either case, this query will return Is_Normalized associations
1324
-- --|IP even if Normalized is False, and the query
1325
-- --|IP Function_Call_Parameters_Normalized will return True.
1327
------------------------------------------------------------------------------
1328
-- 17.31 function Short_Circuit_Operation_Left_Expression
1329
------------------------------------------------------------------------------
1331
function Short_Circuit_Operation_Left_Expression
1332
(Expression : in Asis.Expression)
1333
return Asis.Expression;
1335
------------------------------------------------------------------------------
1336
-- Expression - Specifies the short circuit operation to query
1338
-- Returns the expression preceding the reserved words "and then" or "or else"
1339
-- in the short circuit expression.
1341
-- Appropriate Expression_Kinds:
1342
-- An_And_Then_Short_Circuit
1343
-- An_Or_Else_Short_Circuit
1345
-- Returns Element_Kinds:
1348
------------------------------------------------------------------------------
1349
-- 17.32 function Short_Circuit_Operation_Right_Expression
1350
------------------------------------------------------------------------------
1352
function Short_Circuit_Operation_Right_Expression
1353
(Expression : in Asis.Expression)
1354
return Asis.Expression;
1356
------------------------------------------------------------------------------
1357
-- Expression - Specifies the short circuit operation to query
1359
-- Returns the expression following the reserved words "or else" or "and then"
1360
-- in the short circuit expression.
1362
-- Appropriate Expression_Kinds:
1363
-- An_And_Then_Short_Circuit
1364
-- An_Or_Else_Short_Circuit
1366
-- Returns Element_Kinds:
1369
------------------------------------------------------------------------------
1370
-- 17.33 function Membership_Test_Expression
1371
------------------------------------------------------------------------------
1373
function Membership_Test_Expression
1374
(Expression : in Asis.Expression)
1375
return Asis.Expression;
1377
------------------------------------------------------------------------------
1378
-- Expression - Specifies the membership test operation to query
1380
-- Returns the expression on the left hand side of the membership test.
1382
-- Appropriate Expression_Kinds:
1383
-- An_In_Range_Membership_Test
1384
-- A_Not_In_Range_Membership_Test
1385
-- An_In_Type_Membership_Test
1386
-- A_Not_In_Type_Membership_Test
1388
-- Returns Element_Kinds:
1391
------------------------------------------------------------------------------
1392
-- 17.34 function Membership_Test_Range
1393
------------------------------------------------------------------------------
1395
function Membership_Test_Range
1396
(Expression : in Asis.Expression)
1397
return Asis.Range_Constraint;
1399
------------------------------------------------------------------------------
1400
-- Expression - Specifies the membership test operation to query
1402
-- Returns the range following the reserved words "in" or "not in" from the
1405
-- Appropriate Expression_Kinds:
1406
-- An_In_Range_Membership_Test
1407
-- A_Not_In_Range_Membership_Test
1409
-- Returns Constraint_Kinds:
1410
-- A_Range_Attribute_Reference
1411
-- A_Simple_Expression_Range
1413
------------------------------------------------------------------------------
1414
-- 17.35 function Membership_Test_Subtype_Mark
1415
------------------------------------------------------------------------------
1417
function Membership_Test_Subtype_Mark
1418
(Expression : in Asis.Expression)
1419
return Asis.Expression;
1421
------------------------------------------------------------------------------
1422
-- Expression - Specifies the membership test operation to query
1424
-- Returns the subtype_mark expression following the reserved words "in" or
1425
-- "not in" from the membership test.
1427
-- Appropriate Expression_Kinds:
1428
-- An_In_Type_Membership_Test
1429
-- A_Not_In_Type_Membership_Test
1431
-- Returns Expression_Kinds:
1433
-- A_Selected_Component
1434
-- An_Attribute_Reference
1436
------------------------------------------------------------------------------
1437
-- 17.36 function Converted_Or_Qualified_Subtype_Mark
1438
------------------------------------------------------------------------------
1440
function Converted_Or_Qualified_Subtype_Mark
1441
(Expression : in Asis.Expression)
1442
return Asis.Expression;
1444
------------------------------------------------------------------------------
1445
-- Expression - Specifies the type conversion or qualified expression to
1448
-- Returns the subtype_mark expression that converts or qualifies the
1451
-- Appropriate Expression_Kinds:
1452
-- A_Type_Conversion
1453
-- A_Qualified_Expression
1455
-- Returns Expression_Kinds:
1457
-- A_Selected_Component
1458
-- An_Attribute_Reference
1461
------------------------------------------------------------------------------
1462
-- 17.37 function Converted_Or_Qualified_Expression
1463
------------------------------------------------------------------------------
1465
function Converted_Or_Qualified_Expression
1466
(Expression : in Asis.Expression)
1467
return Asis.Expression;
1469
------------------------------------------------------------------------------
1470
-- Expression - Specifies the type conversion or qualified expression to
1473
-- Returns the expression being converted or qualified.
1475
-- Appropriate Expression_Kinds:
1476
-- A_Type_Conversion
1477
-- A_Qualified_Expression
1479
-- Returns Element_Kinds:
1482
------------------------------------------------------------------------------
1483
-- 17.38 function Allocator_Subtype_Indication
1484
------------------------------------------------------------------------------
1486
function Allocator_Subtype_Indication
1487
(Expression : in Asis.Expression)
1488
return Asis.Subtype_Indication;
1490
------------------------------------------------------------------------------
1491
-- Expression - Specifies the allocator expression to query
1493
-- Returns the subtype indication for the object being allocated.
1495
-- Appropriate Expression_Kinds:
1496
-- An_Allocation_From_Subtype
1498
-- Returns Definition_Kinds:
1499
-- A_Subtype_Indication
1501
------------------------------------------------------------------------------
1502
-- 17.39 function Allocator_Qualified_Expression
1503
------------------------------------------------------------------------------
1505
function Allocator_Qualified_Expression
1506
(Expression : in Asis.Expression)
1507
return Asis.Expression;
1509
------------------------------------------------------------------------------
1510
-- Expression - Specifies the allocator expression to query
1512
-- Returns the qualified expression for the object being allocated.
1514
-- Appropriate Expression_Kinds:
1515
-- An_Allocation_From_Qualified_Expression
1517
-- Returns Expression_Kinds:
1518
-- A_Qualified_Expression
1521
------------------------------------------------------------------------------
1522
-- 17.40 function Is_Dispatching_Operation
1523
------------------------------------------------------------------------------
1525
-- function Is_Dispatching_Operation
1526
-- (Declaration : in Asis.Element)
1529
------------------------------------------------------------------------------
1530
-- Declaration - Specifies the declaration to query.
1532
-- Returns True if the declaration is a primitive subprogram of a tagged type.
1534
-- Returns False for any unexpected argument.
1536
-- Expected Element_Kinds:
1537
-- A_Procedure_Declaration
1538
-- A_Function_Declaration
1539
-- A_Procedure_Renaming_Declaration
1540
-- A_Function_Renaming_Declaration
1542
------------------------------------------------------------------------------
1544
end Asis.Expressions;
b'\\ No newline at end of file'