7.1. Core packages

7.1.2. Libadalang.Common

This package provides types and functions used in the whole Libadalang package tree.

Main_Trace : constant GNATCOLL.Traces.Trace_Handle
Value: GNATCOLL.Traces.Create (“LIBADALANG.MAIN_TRACE”, GNATCOLL.Traces.From_Config)
Default_Charset : constant String
Value: “iso-8859-1”

Default charset to use when creating analysis contexts

type Big_Integer

Shortcut for GNATCOLL.GMP.Integers.Big_Integer

type Precomputed_Symbol_Index
function Precomputed_Symbol (Index : Precomputed_Symbol_Index) return Text_Type
package Symbols is new Langkit_Support.Symbols (Precomputed_Symbol_Index, Precomputed_Symbol)
package Token_Data_Handlers is new Langkit_Support.Token_Data_Handlers (Precomputed_Symbol_Index, Precomputed_Symbol, Symbols)
type Ada_Node_Kind_Type

Type for concrete nodes

function Is_Token_Node (Kind : Ada_Node_Kind_Type) return Boolean

Return whether Kind corresponds to a token node

function Is_List_Node (Kind : Ada_Node_Kind_Type) return Boolean

Return whether Kind corresponds to a list node

type Synthetic_Nodes

Set of nodes that are synthetic.

Parsers cannot create synthetic nodes, so these correspond to no source text. These nodes are created dynamically for convenience during semantic analysis.

type Analysis_Unit_Kind

Specify a kind of analysis unit. Specification units provide an interface to the outer world while body units provide an implementation for the corresponding interface.

function Trace_Image (Self : Analysis_Unit_Kind) return String
type Lookup_Kind
function Trace_Image (Self : Lookup_Kind) return String
type Find_All_Mode
function Trace_Image (Self : Find_All_Mode) return String
type Ref_Result_Kind

Kind for the result of a cross reference operation.

  • NoRef is for no reference, it is the null value for this enum.
  • Precise is when the reference result is precise.
  • Imprecise is when there was an error computing the precise

result, and a result was gotten in an imprecise fashion.

  • Error is for unrecoverable errors (either there is no imprecise

path for the request you made, or the imprecise path errored out too.

function Trace_Image (Self : Ref_Result_Kind) return String
type Grammar_Rule

Gramar rule to use for parsing.

function Trace_Image (Self : Grammar_Rule) return String
Default_Grammar_Rule : constant Grammar_Rule
Value: Compilation_Rule

Default grammar rule to use when parsing analysis units

type Lexer_Input_Kind

Kind of lexer input

type Undecoded_Lexer_Input
type Token_Kind

Kind of token: indentifier, string literal, ...

function Token_Kind_Name (Token_Id : Token_Kind) return String

Return a human-readable name for a token kind.

function Token_Kind_Literal (Token_Id : Token_Kind) return Text_Type

Return the canonical literal corresponding to this token kind, or an empty string if this token has no literal.

function Token_Error_Image (Token_Id : Token_Kind) return String

Return a string representation of Token_Id that is suitable in error messages.

function To_Token_Kind (Raw : Raw_Token_Kind) return Token_Kind
function From_Token_Kind (Kind : Token_Kind) return Raw_Token_Kind
type Token_Family

Groups of token kinds, to make the processing of some groups of token uniform.

Token_Kind_To_Family : array (Token_Kind) of Token_Family

Associate a token family to all token kinds

type Visit_Status

Helper type to control the node traversal process. See the Libadalang.Analysis.Traverse function.

type Token_Reference

Reference to a token in an analysis unit.

No_Token : constant Token_Reference
function "<" (Left, Right : Token_Reference) return Boolean

Assuming Left and Right belong to the same analysis unit, return whether Left came before Right in the source file.

function Next (Token : Token_Reference; Exclude_Trivia : Boolean) return Token_Reference

Return a reference to the next token in the corresponding analysis unit.

function Previous (Token : Token_Reference; Exclude_Trivia : Boolean) return Token_Reference

Return a reference to the previous token in the corresponding analysis unit.

function Data (Token : Token_Reference) return Token_Data_Type

Return the data associated to Token

function Is_Equivalent (L, R : Token_Reference) return Boolean

Return whether L and R are structurally equivalent tokens. This means that their position in the stream won’t be taken into account, only the kind and text of the token.

function Image (Token : Token_Reference) return String

Debug helper: return a human-readable text to represent a token

function Text (Token : Token_Reference) return Text_Type

Return the text of the token as Text_Type

function Text (First, Last : Token_Reference) return Text_Type

Compute the source buffer slice corresponding to the text that spans between the First and Last tokens (both included). This yields an empty slice if Last actually appears before First.

This raises a Constraint_Error if First and Last don’t belong to the same analysis unit.

function Get_Symbol (Token : Token_Reference) return Symbol_Type

Assuming that Token refers to a token that contains a symbol, return the corresponding symbol.

function Is_Trivia (Token : Token_Reference) return Boolean

Return whether this token is a trivia. If it’s not, it’s a regular token.

function Index (Token : Token_Reference) return Token_Index

One-based index for this token/trivia. Tokens and trivias get their own index space.

function Origin_Filename (Token : Token_Reference) return String

Return the name of the file whose content was scanned to create Token. Return an empty string if the source comes from a memory buffer instead of a file.

function Origin_Charset (Token : Token_Reference) return String

Return the charset used to decode the source that was scanned to create Token. Return an empty string if the source was already decoded during the scan.

function Convert (TDH : Token_Data_Handler; Token : Token_Reference; Raw_Data : Stored_Token_Data) return Token_Data_Type

Turn data from TDH and Raw_Data into a user-ready token data record.

function Raw_Data (T : Token_Reference) return Stored_Token_Data

Return the raw token data for T

type Token_Data_Type
function Kind (Token_Data : Token_Data_Type) return Token_Kind

Kind for this token.

function Is_Trivia (Token_Data : Token_Data_Type) return Boolean

Return whether this token is a trivia. If it’s not, it’s a regular token.

function Index (Token_Data : Token_Data_Type) return Token_Index

One-based index for this token/trivia. Tokens and trivias get their own index space.

function Sloc_Range (Token_Data : Token_Data_Type) return Source_Location_Range

Source location range for this token. Note that the end bound is exclusive.

type Child_Or_Trivia

Discriminator for the Child_Record type

type Symbolization_Result

Holder for results of the symbolization process, conditionned by whether this process was successful.

function Create_Symbol (Name : Text_Type) return Symbolization_Result

Shortcut to create successful symbolization results

function Create_Error (Message : Text_Type) return Symbolization_Result

Shortcut to create failed symbolization results

Invalid_Input : exception

Raised by lexing functions (Libadalang.Lexer) when the input contains an invalid byte sequence.

Invalid_Symbol_Error : exception

Exception raise when an invalid symbol is passed to a subprogram.

Invalid_Unit_Name_Error : exception

Raised when an invalid unit name is provided.

Native_Exception : exception

Exception raised in language bindings when the underlying C API reports an unexpected error that occurred in the library.

This kind of exception is raised for internal errors: they should never happen in normal situations and if they are raised at some point, it means the library state is potentially corrupted.

Nevertheless, the library does its best not to crash the program, materializing internal errors using this kind of exception.

Precondition_Failure : exception

Exception raised when an API is called while its preconditions are not satisfied.

Property_Error : exception

Exception that is raised when an error occurs while evaluating any function whose name starts with P_. This is the only exceptions that such functions can raise.

Stale_Reference_Error : exception

Exception raised while trying to access data that was deallocated. This happens when one tries to use a node whose unit has been reparsed, for instance.

Unknown_Charset : exception

Raised by lexing functions (Libadalang.Lexer) when the input charset is not supported.

Invalid_Field : exception

Raised when introspection functions (Libadalang.Introspection) are requested an invalid field.

Node_Data_Evaluation_Error : exception

Raised when introspection functions (Libadalang.Introspection) are improperly used to evaluate a node data (field or property).

Template_Args_Error : exception

Exception raised when the provided arguments for a template don’t match what the template expects.

Template_Format_Error : exception

Exception raised when a template has an invalid syntax, such as badly formatted placeholders.

Template_Instantiation_Error : exception

Exception raised when the instantiation of a template cannot be parsed.

type Any_Node_Type_Id
type Node_Type_Id
type Node_Type_Id_Array
type Any_Value_Kind
type Value_Kind

Enumeration for all types used to interact with properties

type Value_Constraint

Constraint for a polymorphic value

type Value_Constraint_Array
type Any_Node_Data_Reference
type Node_Data_Reference

Enumeration of all data attached to nodes (syntax fields and properties)

type Node_Data_Reference_Array
type Field_Reference

Enumeration of all syntax fields for regular nodes

type Field_Reference_Array
type Property_Reference

Enumeration of all available node properties

type Property_Reference_Array
type Language_Version

Enum representing a version of the Ada language

7.1.2. Libadalang.Analysis

This package provides types and primitives to analyze source files as analysis units.

This is the entry point to parse and process a unit: first create an analysis context with Create_Context, then get analysis units out of it using the Get_From_* functions.

type Analysis_Context

This type represents a context for all source analysis. This is the first type you need to create to use Libadalang. It will contain the results of all analysis, and is the main holder for all the data.

You can create several analysis contexts if you need to, which enables you, for example to:

  • analyze several different projects at the same time;
  • analyze different parts of the same projects in parallel.

In the current design, contexts always keep all of their analysis units allocated. If you need to get this memory released, the only option at your disposal is to destroy your analysis context instance.

No_Analysis_Context : constant Analysis_Context

Special value to mean the absence of analysis context

function Create_Context (Charset : String; Unit_Provider : Unit_Provider_Reference; With_Trivia : Boolean; Tab_Stop : Positive) return Analysis_Context

Create a new analysis context.

Charset will be used as a default charset to decode input sources in analysis units. Please see GNATCOLL.Iconv for several supported charsets. Be careful: passing an unsupported charset is not guaranteed to raise an error here. If no charset is provided, "iso-8859-1" is the default.

When With_Trivia is true, the parsed analysis units will contain trivias.

If provided, Unit_Provider will be used to query the file name that corresponds to a unit reference during semantic analysis. If it is null, the default one is used instead.

Tab_Stop is a positive number to describe the effect of tabulation characters on the column number in source files.

function Has_Unit (Context : Analysis_Context'Class; Unit_Filename : String) return Boolean

Return whether Context contains a unit correponding to Unit_Filename.

function Get_From_File (Context : Analysis_Context'Class; Filename : String; Charset : String; Reparse : Boolean; Rule : Grammar_Rule) return Analysis_Unit

Create a new analysis unit for Filename or return the existing one if any. If Reparse is true and the analysis unit already exists, reparse it from Filename.

Rule controls which grammar rule is used to parse the unit.

Use Charset in order to decode the source. If Charset is empty then use the context’s default charset.

If any failure occurs, such as file opening, decoding, lexing or parsing failure, return an analysis unit anyway: errors are described as diagnostics of the returned analysis unit.

function Get_From_Buffer (Context : Analysis_Context'Class; Filename : String; Charset : String; Buffer : String; Rule : Grammar_Rule) return Analysis_Unit

Create a new analysis unit for Filename or return the existing one if any. Whether the analysis unit already exists or not, (re)parse it from the source code in Buffer.

Rule controls which grammar rule is used to parse the unit.

Use Charset in order to decode the source. If Charset is empty then use the context’s default charset.

If any failure occurs, such as file opening, decoding, lexing or parsing failure, return an analysis unit anyway: errors are described as diagnostics of the returned analysis unit.

function Get_From_Buffer (Context : Analysis_Context'Class; Filename : String; Charset : String; Buffer : Ada.Strings.Unbounded.Unbounded_String; Rule : Grammar_Rule) return Analysis_Unit

Likewise, but working on an unbounded string

function Get_With_Error (Context : Analysis_Context'Class; Filename : String; Error : Text_Type; Charset : String; Rule : Grammar_Rule) return Analysis_Unit

If a Unit for Filename already exists, return it unchanged. Otherwise, create an empty analysis unit for Filename with a diagnostic that contains the Error message.

function Get_From_Provider (Context : Analysis_Context'Class; Name : Text_Type; Kind : Analysis_Unit_Kind; Charset : String; Reparse : Boolean) return Analysis_Unit

Create a new analysis unit for Name/Kind or return the existing one if any. If Reparse is true and the analysis unit already exists, reparse it from Filename.

Use Charset in order to decode the source. If Charset is empty then use the context’s default charset.

If the unit name cannot be tuned into a file name, raise an Invalid_Unit_Name_Error exception. If any other failure occurs, such as file opening, decoding, lexing or parsing failure, return an analysis unit anyway: errors are described as diagnostics of the returned analysis unit.

function Unit_Provider (Context : Analysis_Context'Class) return Unit_Provider_Reference

Return the unit provider for Context

function Hash (Context : Analysis_Context) return Ada.Containers.Hash_Type

Return a hash for this context, to be used in hash tables.

function Has_With_Trivia (Context : Analysis_Context'Class) return Boolean

Return whether Context keeps trivia when parsing units

procedure Discard_Errors_In_Populate_Lexical_Env (Context : Analysis_Context'Class; Discard : Boolean)

Debug helper. Set whether Property_Error exceptions raised in Populate_Lexical_Env should be discarded. They are by default.

procedure Set_Logic_Resolution_Timeout (Context : Analysis_Context'Class; Timeout : Natural)

If Timeout is greater than zero, set a timeout for the resolution of logic equations. The unit is the number of steps in ANY/ALL relations. If Timeout is zero, disable the timeout. By default, the timeout is 100 000 steps.

function Has_Rewriting_Handle (Context : Analysis_Context'Class) return Boolean

Return whether Context has a rewriting handler (see Libadalang.Rewriting), i.e. whether it is in the process of rewriting. If true, this means that the set of currently loaded analysis units is frozen until the rewriting process is done.

type Analysis_Unit

This type represents the analysis of a single file.

This type has strong-reference semantics and is ref-counted. Furthermore, a reference to a unit contains an implicit reference to the context that owns it. This means that keeping a reference to a unit will keep the context and all the unit it contains allocated.

No_Analysis_Unit : constant Analysis_Unit

Special value to mean the absence of analysis unit. No analysis units can be passed this value.

function Context (Unit : Analysis_Unit'Class) return Analysis_Context

Return the context that owns this unit.

function Hash (Unit : Analysis_Unit) return Ada.Containers.Hash_Type

Return a hash for this unit, to be used in hash tables.

procedure Reparse (Unit : Analysis_Unit'Class; Charset : String)

Reparse an analysis unit from the associated file.

Use Charset in order to decode the source. If Charset is empty then use the context’s default charset.

If any failure occurs, such as decoding, lexing or parsing failure, diagnostic are emitted to explain what happened.

procedure Reparse (Unit : Analysis_Unit'Class; Charset : String; Buffer : String)

Reparse an analysis unit from a buffer.

Use Charset in order to decode the source. If Charset is empty then use the context’s default charset.

If any failure occurs, such as decoding, lexing or parsing failure, diagnostic are emitted to explain what happened.

procedure Populate_Lexical_Env (Unit : Analysis_Unit'Class)

Create lexical environments for this analysis unit, according to the specifications given in the language spec.

If not done before, it will be automatically called during semantic analysis. Calling it before enables one to control where the latency occurs.

Depending on whether errors are discarded (see Discard_Errors_In_Populate_Lexical_Env), raise a Property_Error on failure.

function Get_Filename (Unit : Analysis_Unit'Class) return String

Return the filename this unit is associated to.

function Get_Charset (Unit : Analysis_Unit'Class) return String

Return the charset that was used to parse Unit

function Has_Diagnostics (Unit : Analysis_Unit'Class) return Boolean

Return whether this unit has associated diagnostics.

function Diagnostics (Unit : Analysis_Unit'Class) return Diagnostics_Array

Return an array that contains the diagnostics associated to this unit.

function Format_GNU_Diagnostic (Unit : Analysis_Unit'Class; D : Diagnostic) return String

Format a diagnostic in a GNU fashion. See <https://www.gnu.org/prep/standards/html_node/Errors.html>.

function Root (Unit : Analysis_Unit'Class) return Ada_Node

Return the root node for this unit, or null if there is none.

function First_Token (Unit : Analysis_Unit'Class) return Token_Reference

Return a reference to the first token scanned in this unit.

function Last_Token (Unit : Analysis_Unit'Class) return Token_Reference

Return a reference to the last token scanned in this unit.

function Token_Count (Unit : Analysis_Unit'Class) return Natural

Return the number of tokens in this unit.

function Trivia_Count (Unit : Analysis_Unit'Class) return Natural

Return the number of trivias in this unit. This is 0 for units that were parsed with trivia analysis disabled.

function Text (Unit : Analysis_Unit'Class) return Text_Type

Return the source buffer associated to this unit.

function Lookup_Token (Unit : Analysis_Unit'Class; Sloc : Source_Location) return Token_Reference

Look for a token in this unit that contains the given source location. If this falls before the first token, return the first token. If this falls between two tokens, return the token that appears before. If this falls after the last token, return the last token. If there is no token in this unit, return no token.

procedure Dump_Lexical_Env (Unit : Analysis_Unit'Class)

Debug helper: output the lexical envs for the given analysis unit.

procedure Print (Unit : Analysis_Unit'Class; Show_Slocs : Boolean)

Debug helper: output the AST and eventual diagnostic for this unit on standard output.

If Show_Slocs, include AST nodes’ source locations in the output.

procedure PP_Trivia (Unit : Analysis_Unit'Class)

Debug helper: output a minimal AST with mixed trivias

type Ada_Node

Data type for all nodes. Nodes are assembled to make up a tree. See the node primitives below to inspect such trees.

Unlike for contexts and units, this type has weak-reference semantics: keeping a reference to a node has no effect on the decision to keep the unit that it owns allocated. This means that once all references to the context and units related to a node are dropped, the context and its units are deallocated and the node becomes a stale reference: most operations on it will raise a Stale_Reference_Error.

Note that since reparsing an analysis unit deallocates all the nodes it contains, this operation makes all reference to these nodes stale as well.

Root node class for the Ada syntax tree.

No_Ada_Node : constant Ada_Node

Special value to represent the absence of a node. Note that every node type derived from the root type has a similar No_Node constant.

function Is_Null (Node : Ada_Node'Class) return Boolean

Return whether this node is a null node reference.

function Is_Token_Node (Node : Ada_Node'Class) return Boolean

Return whether this node is a node that contains only a single token.

function Is_Synthetic (Node : Ada_Node'Class) return Boolean

Return whether this node is synthetic.

function "=" (L, R : Ada_Node'Class) return Boolean

Return whether L and R designate the same entity

function Image (Node : Ada_Node'Class) return String

Return a short string describing Node, or “None” if Node.Is_Null is true.

function Children_And_Trivia (Node : Ada_Node'Class) return Children_Array

Return the children of this node interleaved with Trivia token nodes, so that:

  • Every trivia contained between Node.Start_Token and Node.End_Token - 1 will be part of the returned array.
  • Nodes and trivias will be lexically ordered.
function Create_Aspect (Exists : Boolean; Node : Ada_Node'Class; Value : Expr'Class) return Aspect
function Kind (Node : Ada_Node'Class) return Ada_Node_Kind_Type
function Kind_Name (Node : Ada_Node'Class) return String

Return the concrete kind for Node

function P_Declarative_Scope (Node : Ada_Node'Class) return Declarative_Part

Return the scope of definition of this basic declaration.

function P_Complete (Node : Ada_Node'Class) return Completion_Item_Array

Return possible completions at this point in the file.

function P_Valid_Keywords (Node : Ada_Node'Class) return Unbounded_Text_Type_Array

Return the list of keywords that are valid at this point in the file.

Note

This is work in progress. It will return all keywords for now, without looking at the context.

function P_Generic_Instantiations (Node : Ada_Node'Class) return Generic_Instantiation_Array

Return the potentially empty list of generic package/subprogram instantiations that led to the creation of this entity. Outer-most instantiations appear last.

function P_Semantic_Parent (Node : Ada_Node'Class) return Ada_Node

Return the semantic parent for this node, if applicable, null otherwise.

function P_Parent_Basic_Decl (Node : Ada_Node'Class) return Basic_Decl

Return the parent basic decl for this node, if applicable, null otherwise.

Note

If the parent BasicDecl of the given node is a generic declaration, this call will return the instantiation from which the node was retrieved instead, if any.

function P_Filter_Is_Imported_By (Node : Ada_Node'Class; Units : Analysis_Unit_Array; Transitive : Boolean) return Analysis_Unit_Array

Filters out among the list of given units those that cannot refer to the unit in which this node lies. If transitive is True, the whole transitive closure of imports will be used to find a reference to the unit of this node.

function P_Xref_Entry_Point (Node : Ada_Node'Class) return Boolean

Designates entities that are entry point for the xref solving infrastructure. If this returns true, then resolve_names can be called on it.

Note

For convenience, and unlike what is defined in the ARM wrt. complete contexts for name resolution, xref_entry_points can be nested.

function P_Resolve_Names (Node : Ada_Node'Class) return Boolean

This will resolve names for this node. If the operation is successful, then type_var and ref_var will be bound on appropriate subnodes of the statement.

function P_Standard_Unit (Node : Ada_Node'Class) return Analysis_Unit

Static method. Return the analysis unit corresponding to the Standard package.

function P_Std_Entity (Node : Ada_Node'Class; Sym : Unbounded_Text_Type) return Ada_Node

Static property. Return an entity from the standard package with name sym.

function P_Bool_Type (Node : Ada_Node'Class) return Ada_Node

Static method. Return the standard Boolean type.

function P_Int_Type (Node : Ada_Node'Class) return Ada_Node

Static method. Return the standard Integer type.

function P_Universal_Int_Type (Node : Ada_Node'Class) return Ada_Node

Static method. Return the standard Universal Integer type.

function P_Universal_Real_Type (Node : Ada_Node'Class) return Ada_Node

Static method. Return the standard Universal Real type.

function P_Top_Level_Decl (Node : Ada_Node'Class; Unit : Analysis_Unit'Class) return Basic_Decl

Static method. Get the top-level decl in unit. This is the body of a Subunit, or the item of a LibraryItem.

function P_Choice_Match (Node : Ada_Node'Class; Value : Big_Integer) return Boolean

Assuming that self is a choice expression (such as what can appear in an alternative of a case statement or in the RHS of a membership expression, this property returns whether the given value satisfies it.

Attention

This is an experimental feature, so even if it is exposed to allow experiments, it is totally unsupported and the API and behavior are very likely to change in the future.

function P_Gnat_Xref (Node : Ada_Node'Class; Imprecise_Fallback : Boolean) return Defining_Name

Return a cross reference from this name to a defining identifier, trying to mimic GNAT’s xrefs as much as possible.

function Parent (Node : Ada_Node'Class) return Ada_Node

Return the lexical parent for this node. Return null for the root AST node or for AST nodes for which no one has a reference to the parent.

function Parents (Node : Ada_Node'Class) return Ada_Node_Array

Return an array that contains the lexical parents (this node included). Nearer parents are first in the list.

function Children (Node : Ada_Node'Class) return Ada_Node_Array

Return an array that contains the direct lexical children.

function Token_Start (Node : Ada_Node'Class) return Token_Reference

Return the first token used to parse this node.

function Token_End (Node : Ada_Node'Class) return Token_Reference

Return the last token used to parse this node.

function Child_Index (Node : Ada_Node'Class) return Integer

Return the 0-based index for Node in its parent’s children.

function Previous_Sibling (Node : Ada_Node'Class) return Ada_Node

Return the node’s previous sibling, if there is one.

function Next_Sibling (Node : Ada_Node'Class) return Ada_Node

Return the node’s next sibling, if there is one.

function Unit (Node : Ada_Node'Class) return Analysis_Unit

Return the analysis unit owning this node.

function Is_Ghost (Node : Ada_Node'Class) return Boolean

Return whether the node is a ghost.

Unlike regular nodes, ghost nodes cover no token in the input source: they are logically located instead between two tokens. The “token_first” of all ghost nodes is the token right after this logical position, while they have no “token_last”.

function Full_Sloc_Image (Node : Ada_Node'Class) return Text_Type

Return a string containing the filename + the sloc in GNU conformant format. Useful to create diagnostics from a node.

function Children_Count (Node : Ada_Node'Class) return Natural

Return the number of children Node has

function First_Child_Index (Node : Ada_Node'Class) return Natural

Return the index of the first child Node has

function Last_Child_Index (Node : Ada_Node'Class) return Natural

Return the index of the last child Node has, or 0 if there is no child

procedure Get_Child (Node : Ada_Node'Class; Index : Positive; Index_In_Bounds : Boolean; Result : Ada_Node)

Return the Index’th child of node, storing it into Result.

Child indexing is 1-based. Store in Index_In_Bounds whether Node had such a child: if not (i.e. Index is out-of-bounds), the content of Result is undefined.

function Child (Node : Ada_Node'Class; Index : Positive) return Ada_Node

Return the Index’th child of Node, or null if Node has no such child

function Traverse (Node : Ada_Node'Class; Visit : access function (Node : Ada_Node'Class) return Visit_Status) return Visit_Status

Given the parent node for a subtree, traverse all syntactic nodes of this tree, calling the given function on each node in prefix order (i.e. top-down). The order of traversing subtrees follows the order of declaration of the corresponding attributes in the grammar. The traversal is controlled as follows by the result returned by Visit:

Into The traversal continues normally with the syntactic
children of the node just processed.
Over The children of the node just processed are skipped and
excluded from the traversal, but otherwise processing continues elsewhere in the tree.
Stop The entire traversal is immediately abandoned, and the
original call to Traverse returns Stop.
procedure Traverse (Node : Ada_Node'Class; Visit : access function (Node : Ada_Node'Class) return Visit_Status)

This is the same as Traverse function except that no result is returned i.e. the Traverse function is called and the result is simply discarded.

function Sloc_Range (Node : Ada_Node'Class) return Source_Location_Range

Return the source location range corresponding to the set of tokens from which Node was parsed.

function Compare (Node : Ada_Node'Class; Sloc : Source_Location) return Relative_Position

Compare Sloc to the sloc range of Node

function Lookup (Node : Ada_Node'Class; Sloc : Source_Location) return Ada_Node

Look for the bottom-most AST node whose sloc range contains Sloc. Return it, or null if no such node was found.

function Text (Node : Ada_Node'Class) return Text_Type

Return the source buffer slice corresponding to the text that spans between the first and the last tokens of this node.

Note that this returns the empty string for synthetic nodes.

function Token_Range (Node : Ada_Node'Class) return Token_Iterator

Return an iterator on the range of tokens encompassed by Node

procedure Print (Node : Ada_Node'Class; Show_Slocs : Boolean; Line_Prefix : String)

Debug helper: print to standard output Node and all its children.

If Show_Slocs, include AST nodes’ source locations in the output.

Line_Prefix is prepended to each output line.

procedure PP_Trivia (Node : Ada_Node'Class; Line_Prefix : String)

Debug helper: print to standard output Node and all its children along with the trivia associated to them. Line_Prefix is prepended to each output line.

procedure Assign_Names_To_Logic_Vars (Node : Ada_Node'Class)

Debug helper: Assign names to every logical variable in the root node, so that we can trace logical variables.

function Hash (Node : Ada_Node) return Ada.Containers.Hash_Type

Generic hash function, to be used for nodes as keys in hash tables

type Expr

Base class for expressions.

function Create_Discrete_Range (Low_Bound : Expr'Class; High_Bound : Expr'Class) return Discrete_Range
function P_Expression_Type (Node : Expr'Class) return Base_Type_Decl

Return the declaration corresponding to the type of this expression after name resolution.

function P_Is_Static_Expr (Node : Expr'Class; Imprecise_Fallback : Boolean) return Boolean

Return whether this expression is static according to the ARM definition of static. See RM 4.9.

function P_First_Corresponding_Decl (Node : Expr'Class) return Basic_Decl

Return the first decl that is lexically named like self in self’s scope.

function P_Eval_As_Int (Node : Expr'Class) return Big_Integer

Statically evaluates self, and returns the value of the evaluation as an integer.

Note

In order for a call to this not to raise, the expression needs to be a static expression, as specified in the ARM section 4.9. You can verify whether an expression is static with the is_static_expr property.

Attention

This is an experimental feature, so even if it is exposed to allow experiments, it is totally unsupported and the API and behavior are very likely to change in the future.

function P_Eval_As_Int_In_Env (Node : Expr'Class; Env : Substitution_Array) return Big_Integer

Statically evaluates self, and returns the value of the evaluation as an integer. The given environment is used to substitute references to declarations by actual values.

Note

In order for a call to this not to raise, the expression needs to be a static expression, as specified in the ARM section 4.9. You can verify whether an expression is static with the is_static_expr property.

Attention

This is an experimental feature, so even if it is exposed to allow experiments, it is totally unsupported and the API and behavior are very likely to change in the future.

function P_Matching_Nodes (Node : Expr'Class) return Ada_Node_Array

Return the list of AST nodes that can be a match for this expression before overloading analysis.

type Basic_Decl

Root class for an Ada declaration (RM 3.1). A declaration associates a name with a language entity, for example a type or a variable.

function Create_Completion_Item (Decl : Basic_Decl'Class; Is_Dot_Call : Boolean; Is_Visible : Boolean) return Completion_Item
function Create_Refd_Decl (Decl : Basic_Decl'Class; Kind : Ref_Result_Kind) return Refd_Decl
function Create_Substitution (From_Decl : Basic_Decl'Class; To_Value : Big_Integer; Value_Type : Base_Type_Decl'Class) return Substitution
function F_Aspects (Node : Basic_Decl'Class) return Aspect_Spec

Return the list of aspects that are attached to this node.

function P_Is_Formal (Node : Basic_Decl'Class) return Boolean

Whether this decl is the nested decl of a generic formal declaration.

function P_Doc_Annotations (Node : Basic_Decl'Class) return Doc_Annotation_Array

Return the documentation annotations associated with this decl. Annotations are any comment line of the form:

--% [annotation_name]: [annotation]

Raises a property error if the doc is incorrectly formatted.

Attention

This is an experimental feature, so even if it is exposed to allow experiments, it is totally unsupported and the API and behavior are very likely to change in the future.

function P_Doc (Node : Basic_Decl'Class) return Text_Type

Return the documentation associated with this decl. Raises a property error if the doc is incorrectly formatted.

Attention

This is an experimental feature, so even if it is exposed to allow experiments, it is totally unsupported and the API and behavior are very likely to change in the future.

function P_Previous_Part_For_Decl (Node : Basic_Decl'Class) return Basic_Decl

Return the previous part for this decl, if applicable.

Note

It is not named previous_part, because BaseTypeDecl has a more precise version of previous_part that returns a BaseTypeDecl. Probably, we want to rename the specific versions, and have the root property be named previous_part. (TODO R925-008)

function P_Canonical_Part (Node : Basic_Decl'Class) return Basic_Decl

Return the canonical part for this decl. In the case of decls composed of several parts, the canonical part will be the first part.

function P_Is_Static_Decl (Node : Basic_Decl'Class; Imprecise_Fallback : Boolean) return Boolean

Return whether this declaration is static.

function P_Is_Imported (Node : Basic_Decl'Class) return Boolean

Whether this declaration is imported from another language.

function P_Get_Aspect_Assoc (Node : Basic_Decl'Class; Name : Unbounded_Text_Type) return Aspect_Assoc

Return the aspect with name name for this entity.

function P_Get_Aspect_Spec_Expr (Node : Basic_Decl'Class; Name : Unbounded_Text_Type) return Expr

Return the expression associated to the aspect with name name for this entity.

function P_Get_Aspect (Node : Basic_Decl'Class; Name : Unbounded_Text_Type; Imprecise_Fallback : Boolean) return Aspect

Return the aspect with name name associated to this entity.

Aspects are properties of entities that can be specified by the Ada program, either via aspect specifications, pragmas, or attributes.

This will return the syntactic node corresponding to attribute directly.

function P_Has_Aspect (Node : Basic_Decl'Class; Name : Unbounded_Text_Type; Imprecise_Fallback : Boolean) return Boolean

Returns whether the boolean aspect named name is set on the entity represented by this node.

“Aspect” is used as in RM terminology (see RM 13).

function P_Get_Pragma (Node : Basic_Decl'Class; Name : Unbounded_Text_Type) return Pragma_Node

Return the pragma with name name associated to this entity.

function P_Get_Representation_Clause (Node : Basic_Decl'Class; Name : Unbounded_Text_Type; Imprecise_Fallback : Boolean) return Attribute_Def_Clause

Return the representation clause associated to this type decl that defines the given attribute name.

function P_Is_Compilation_Unit_Root (Node : Basic_Decl'Class) return Boolean

Whether a BasicDecl is the root decl for its unit.

function P_Is_Visible (Node : Basic_Decl'Class; From_Node : Ada_Node'Class) return Boolean

Return whether this declaration is visible from the point of view of the given origin node.

Attention

Only package-level (public or private) declarations are supported for now.

function P_Base_Subp_Declarations (Node : Basic_Decl'Class) return Basic_Decl_Array

If Self declares a primitive subprogram of some tagged type T, return the set of all subprogram declarations that it overrides (including itself).

function P_Root_Subp_Declarations (Node : Basic_Decl'Class; Origin : Ada_Node'Class) return Basic_Decl_Array

If Self declares a primitive subprogram of some tagged type T, return the root subprogram declarations that it overrides. There can be several, as in the following scenario:

  • package Root defines the root tagged type T and subprogram Foo.
  • package Itf defines interface I and abstract subprogram Foo.
  • package D defines “type U is new Root.T and Itf.I” and an overriding

subprogram Foo.

Here, root_subp_declarations of Foo defined in package D will return both Foo from package Root and Foo from package Itf.

function P_Find_All_Overrides (Node : Basic_Decl'Class; Units : Analysis_Unit_Array; Imprecise_Fallback : Boolean) return Basic_Decl_Array

If Self is the declaration of a primitive of some type T, return the list of all subprogram that override this subprogram among the given units.

function P_Defining_Names (Node : Basic_Decl'Class) return Defining_Name_Array

Get all the names of this basic declaration.

function P_Defining_Name (Node : Basic_Decl'Class) return Defining_Name

Get the name of this declaration. If this declaration has several names, it will return the first one.

function P_Type_Expression (Node : Basic_Decl'Class) return Type_Expr

Return the type expression for this BasicDecl if applicable, a null otherwise.

function P_Subp_Spec_Or_Null (Node : Basic_Decl'Class; Follow_Generic : Boolean) return Base_Subp_Spec

If Self is a Subp, returns the specification of this subprogram.

If follow_generic is True, will also work for instances of GenericSubpDecl.

function P_Is_Subprogram (Node : Basic_Decl'Class) return Boolean

Return True if self is a subprogram node in the general sense (which is, an entity that can be called). This includes separates and entries.

function P_Relative_Name (Node : Basic_Decl'Class) return Single_Tok_Node

Return the relative name for Self. If Self’s defining name is A.B.C, return C as a node.

function P_Relative_Name_Text (Node : Basic_Decl'Class) return Unbounded_Text_Type

Return the relative name for Self, as text.

function P_Next_Part_For_Decl (Node : Basic_Decl'Class) return Basic_Decl

Return the next part of this declaration, if applicable.

Note

It is not named next_part, because BaseTypeDecl has a more precise version of next_part that returns a BaseTypeDecl. Probably, we want to rename the specific versions, and have the root property be named next_part. (TODO R925-008)

function P_Body_Part_For_Decl (Node : Basic_Decl'Class) return Body_Node

Return the body corresponding to this declaration, if applicable.

Note

It is not named body_part, subclasses have more precise versions named body_part and returning a more precise result. Probably, we want to rename the specific versions, and have the root property be named body_part. (TODO R925-008)

function P_Fully_Qualified_Name_Array (Node : Basic_Decl'Class) return Unbounded_Text_Type_Array

Return the fully qualified name corresponding to this declaration, as an array of symbols.

function P_Fully_Qualified_Name (Node : Basic_Decl'Class) return Text_Type

Return the fully qualified name corresponding to this declaration.

function P_Canonical_Fully_Qualified_Name (Node : Basic_Decl'Class) return Text_Type

Return a canonical representation of the fully qualified name corresponding to this declaration.

function P_Unique_Identifying_Name (Node : Basic_Decl'Class) return Text_Type

Return a unique identifying name for this declaration, provided this declaration is a public declaration. In the case of subprograms, this will include the profile.

Attention

This will only return a unique name for public declarations. Notably, anything nested in an unnamed declare block won’t be handled correctly.

type Ada_List
type Ada_Node_List

List of AdaNode.

This list node can contain one of the following nodes:

  • Abstract_Subp_Decl
  • Allocator
  • Aspect_Clause
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Body_Node
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Component_Clause
  • Component_Decl
  • Decl_Expr
  • Dotted_Name
  • Entry_Decl
  • Error_Decl
  • Exception_Decl
  • Exception_Handler
  • Explicit_Deref
  • Generic_Decl
  • Generic_Formal
  • Generic_Instantiation
  • Generic_Renaming_Decl
  • Identifier
  • If_Expr
  • Incomplete_Type_Decl
  • Membership_Expr
  • Null_Component_Decl
  • Null_Literal
  • Num_Literal
  • Number_Decl
  • Object_Decl
  • Others_Designator
  • Package_Decl
  • Package_Renaming_Decl
  • Paren_Expr
  • Pragma_Node
  • Protected_Type_Decl
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • Single_Protected_Decl
  • Single_Task_Decl
  • Stmt
  • String_Literal
  • Subp_Decl
  • Subtype_Decl
  • Subtype_Indication
  • Target_Name
  • Task_Type_Decl
  • Type_Decl
  • Un_Op
  • Use_Clause
  • With_Clause
function Ada_Node_List_First (Node : Ada_Node_List) return Positive

Implementation detail for the Iterable aspect

function Ada_Node_List_Next (Node : Ada_Node_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Ada_Node_List_Has_Element (Node : Ada_Node_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Ada_Node_List_Element (Node : Ada_Node_List; Cursor : Positive) return Ada_Node'Class

Implementation detail for the Iterable aspect

type Alternatives_List

List of alternatives in a when ... clause.

This list node can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Name

Base class for names.

function P_Enclosing_Defining_Name (Node : Name'Class) return Defining_Name

If this name is part of a defining name, return the enclosing defining name node.

function P_Is_Defining (Node : Name'Class) return Boolean

Return True if this name is part of a defining name.

function P_Name_Is (Node : Name'Class; Sym : Unbounded_Text_Type) return Boolean

Helper. Check that this name matches sym.

function P_Is_Direct_Call (Node : Name'Class) return Boolean

Return True iff this name represents a call to a subprogram which is referred by its defining name. (i.e. not through a subprogram access).

function P_Is_Access_Call (Node : Name'Class) return Boolean

Return True iff this name represents a call to subprogram through an access type.

function P_Is_Call (Node : Name'Class) return Boolean

Returns True if this Name corresponds to a call.

function P_Is_Dot_Call (Node : Name'Class; Imprecise_Fallback : Boolean) return Boolean

Returns True if this Name corresponds to a dot notation call.

function P_Failsafe_Referenced_Def_Name (Node : Name'Class; Imprecise_Fallback : Boolean) return Refd_Def

Failsafe version of referenced_defining_name. Returns a RefdDef, which can be precise, imprecise, or error.

function P_Referenced_Defining_Name (Node : Name'Class; Imprecise_Fallback : Boolean) return Defining_Name

Like referenced_decl, but will return the defining identifier for the decl, rather than the basic declaration node itself.

function P_All_Env_Elements (Node : Name'Class; Seq : Boolean; Seq_From : Ada_Node'Class) return Ada_Node_Array

Return all elements in self’s scope that are lexically named like Self.

function P_Called_Subp_Spec (Node : Name'Class) return Base_Formal_Param_Holder

Return the subprogram specification of the subprogram or subprogram access that is being called by this exact Name, if relevant.

function P_Referenced_Decl (Node : Name'Class; Imprecise_Fallback : Boolean) return Basic_Decl

Return the declaration this node references after name resolution. If imprecise_fallback is True, errors raised during resolution of the xref equation are catched and a fallback mechanism is triggered, which tries to find the referenced declaration in an ad-hoc way.

function P_Failsafe_Referenced_Decl (Node : Name'Class; Imprecise_Fallback : Boolean) return Refd_Decl

Failsafe version of referenced_decl. Returns a RefdDecl, which can be precise, imprecise, or error.

function P_Referenced_Decl_Internal (Node : Name'Class; Imprecise_Fallback : Boolean) return Refd_Decl

Return the declaration this node references. Try not to run name res if already resolved. INTERNAL USE ONLY.

function P_Name_Designated_Type (Node : Name'Class) return Base_Type_Decl

Like SubtypeIndication.designated_type, but on names, since because of Ada’s ambiguous grammar, some subtype indications will be parsed as names.

function P_Is_Static_Subtype (Node : Name'Class; Imprecise_Fallback : Boolean) return Boolean

Returns whether Self denotes a static subtype or not.

function P_Name_Matches (Node : Name'Class; N : Name'Class) return Boolean

Return whether two names match each other.

This compares the symbol for Identifier and StringLiteral nodes. We consider that there is no match for all other node kinds.

function P_Relative_Name (Node : Name'Class) return Single_Tok_Node

Returns the relative name of this instance. For example, for a prefix A.B.C, this will return C.

function P_Is_Operator_Name (Node : Name'Class) return Boolean

Return whether the name that Self designates is an operator.

function P_Is_Write_Reference (Node : Name'Class; Imprecise_Fallback : Boolean) return Boolean

Whether this name is a write reference.

For example, X is a write reference in the following cases:

1. X := 2; 2. X (2) := 2; 3. P(F => X) where F is declared out or in out. 6. X.P where the formal for X is declared out or in out. 4. X’Access. 5. X.C := 2, R.X := 2

Note

This is an experimental feature. There might be some discrepancy with the GNAT concept of “write reference”.

function P_Is_Dispatching_Call (Node : Name'Class; Imprecise_Fallback : Boolean) return Boolean

Returns True if this Name corresponds to a dispatching call, including:

  • calls done through subprogram access types.
  • calls to dispatching subprograms, in the object-oriented sense.

Note

This is an experimental feature. There might be some discrepancy with the GNAT concept of “dispatching call”.

function P_Is_Static_Call (Node : Name'Class; Imprecise_Fallback : Boolean) return Boolean

Returns True if this Name corresponds to a static non-dispatching call. In other words, this will return True if and only if the target of the call is known statically.

Note

This is an experimental feature. There might be some discrepancy with the GNAT concept of “static call”.

function P_As_Symbol_Array (Node : Name'Class) return Unbounded_Text_Type_Array

Turn this name into an array of symbols.

For instance, a node with name A.B.C is turned into ['A', 'B', 'C'].

type Single_Tok_Node

Base class for nodes that are made up of a single token.

function P_Canonical_Text (Node : Single_Tok_Node'Class) return Unbounded_Text_Type

Return a canonicalized version of this node’s text.

type Base_Id

Base class for identifiers.

function Create_Ref_Result (Ref : Base_Id'Class; Kind : Ref_Result_Kind) return Ref_Result
type Identifier

Regular identifier.

function Create_Discriminant_Values (Discriminant : Identifier'Class; Values : Alternatives_List'Class) return Discriminant_Values
type Abort_Node

Qualifier for the abort keyword.

function P_As_Bool (Node : Abort_Node'Class) return Boolean

Return whether this is an instance of AbortPresent

type Abort_Absent
type Abort_Present
type Stmt

Bass class for statements.

type Simple_Stmt

Base class for simple statements.

type Abort_Stmt

abort statement.

function F_Names (Node : Abort_Stmt'Class) return Name_List

This field contains a list that itself contains one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type Abstract_Node

Qualifier for the abstract keyword.

function P_As_Bool (Node : Abstract_Node'Class) return Boolean

Return whether this is an instance of AbstractPresent

type Abstract_Absent
type Basic_Subp_Decl

Base class for subprogram declarations.

function P_Subp_Decl_Spec (Node : Basic_Subp_Decl'Class) return Base_Subp_Spec

Return the specification for this subprogram

function P_Body_Part (Node : Basic_Subp_Decl'Class) return Base_Subp_Body

Return the BaseSubpBody corresponding to this node.

type Classic_Subp_Decl

This is an intermediate abstract class for subprogram declarations with a common structure: overriding indicator, SubpSpec, aspects, <other fields>.

function F_Overriding (Node : Classic_Subp_Decl'Class) return Overriding_Node
function F_Overriding (Node : Classic_Subp_Decl'Class) return Ada_Overriding_Node
function F_Subp_Spec (Node : Classic_Subp_Decl'Class) return Subp_Spec
type Formal_Subp_Decl

Formal subprogram declarations, in generic declarations formal parts.

function F_Default_Expr (Node : Formal_Subp_Decl'Class) return Expr

This field can contain one of the following nodes:

  • Attribute_Ref
  • Box_Expr
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Null_Literal
  • Qual_Expr
  • String_Literal
  • Target_Name
type Abstract_Formal_Subp_Decl

Formal declaration for an abstract subprogram.

type Abstract_Present
type Abstract_Subp_Decl

Declaration for an abstract subprogram.

type Composite_Stmt

Base class for composite statements.

type Accept_Stmt

accept statement.

function F_Name (Node : Accept_Stmt'Class) return Identifier
function F_Entry_Index_Expr (Node : Accept_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Params (Node : Accept_Stmt'Class) return Entry_Completion_Formal_Params
type Accept_Stmt_With_Stmts

Extended accept statement.

function F_Stmts (Node : Accept_Stmt_With_Stmts'Class) return Handled_Stmts
function F_End_Name (Node : Accept_Stmt_With_Stmts'Class) return End_Name
type Type_Def

Base class for type definitions.

type Access_Def

Base class for access type definitions.

function F_Has_Not_Null (Node : Access_Def'Class) return Not_Null
function F_Has_Not_Null (Node : Access_Def'Class) return Boolean
type Access_To_Subp_Def

Type definition for accesses to subprograms.

function F_Has_Protected (Node : Access_To_Subp_Def'Class) return Protected_Node
function F_Has_Protected (Node : Access_To_Subp_Def'Class) return Boolean
function F_Subp_Spec (Node : Access_To_Subp_Def'Class) return Subp_Spec
type Base_Aggregate

Base class for aggregates.

function F_Ancestor_Expr (Node : Base_Aggregate'Class) return Expr
function F_Assocs (Node : Base_Aggregate'Class) return Assoc_List
type Aggregate

Aggregate that is not a null record aggregate.

type Basic_Assoc

Association of one or several names to an expression.

function P_Get_Params (Node : Basic_Assoc'Class; Imprecise_Fallback : Boolean) return Defining_Name_Array

Return the list of parameters that this association refers to.

type Aggregate_Assoc

Assocation (X => Y) used for aggregates and parameter associations.

function F_Designators (Node : Aggregate_Assoc'Class) return Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_R_Expr (Node : Aggregate_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Aliased_Node

Qualifier for the aliased keyword.

function P_As_Bool (Node : Aliased_Node'Class) return Boolean

Return whether this is an instance of AliasedPresent

type Aliased_Absent
type Aliased_Present
type All_Node

Qualifier for the all keyword.

function P_As_Bool (Node : All_Node'Class) return Boolean

Return whether this is an instance of AllPresent

type All_Absent
type All_Present
type Allocator

Allocator expression (new ...).

function F_Subpool (Node : Allocator'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Type_Or_Expr (Node : Allocator'Class) return Ada_Node

This field can contain one of the following nodes:

  • Qual_Expr
  • Subtype_Indication
function P_Get_Allocated_Type (Node : Allocator'Class) return Base_Type_Decl

Return the allocated type for this allocator.

type Object_Decl

Base class for Ada object declarations (RM 3.3.1). Ada object declarations are variables/constants declarations that can be declared in any declarative scope.

function F_Ids (Node : Object_Decl'Class) return Defining_Name_List
function F_Has_Aliased (Node : Object_Decl'Class) return Aliased_Node
function F_Has_Aliased (Node : Object_Decl'Class) return Boolean
function F_Has_Constant (Node : Object_Decl'Class) return Constant_Node
function F_Has_Constant (Node : Object_Decl'Class) return Boolean
function F_Mode (Node : Object_Decl'Class) return Mode
function F_Mode (Node : Object_Decl'Class) return Ada_Mode
function F_Type_Expr (Node : Object_Decl'Class) return Type_Expr
function F_Default_Expr (Node : Object_Decl'Class) return Expr
function F_Renaming_Clause (Node : Object_Decl'Class) return Renaming_Clause
function P_Public_Part_Decl (Node : Object_Decl'Class) return Basic_Decl

If this object decl is the constant completion of an object decl in the public part, return the object decl from the public part.

type Anonymous_Object_Decl
type Type_Expr

A type expression is an abstract node that embodies the concept of a reference to a type.

Since Ada has both subtype_indications and anonymous (inline) type declarations, a type expression contains one or the other.

function P_Type_Name (Node : Type_Expr'Class) return Name

Return the name node for this type expression, if applicable, else null

function P_Designated_Type_Decl (Node : Type_Expr'Class) return Base_Type_Decl

Returns the type declaration designated by this type expression.

function P_Designated_Type_Decl_From (Node : Type_Expr'Class; Origin_Node : Ada_Node'Class) return Base_Type_Decl

Return the type declaration designated by this type expression as viewed from the node given by origin_node.

type Anonymous_Type

Container for inline anonymous array and access types declarations.

function F_Type_Decl (Node : Anonymous_Type'Class) return Anonymous_Type_Decl
type Base_Type_Access_Def

Base class for access type definitions.

type Anonymous_Type_Access_Def

Synthetic type access, that will directly reference a type decl. It is used to generate synthetic anonymous access types.

function F_Type_Decl (Node : Anonymous_Type_Access_Def'Class) return Base_Type_Decl
type Base_Type_Decl

Base class for type declarations.

function F_Name (Node : Base_Type_Decl'Class) return Defining_Name
function P_Base_Subtype (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

If this type decl is a subtype decl, return the base subtype. If not, return Self.

function P_Private_Completion (Node : Base_Type_Decl'Class) return Base_Type_Decl

Return the private completion for this type, if there is one.

function P_Get_Record_Representation_Clause (Node : Base_Type_Decl'Class; Imprecise_Fallback : Boolean) return Record_Rep_Clause

Return the record representation clause associated to this type decl, if applicable (i.e. this type decl defines a record type).

function P_Get_Enum_Representation_Clause (Node : Base_Type_Decl'Class; Imprecise_Fallback : Boolean) return Enum_Rep_Clause

Return the enum representation clause associated to this type decl, if applicable (i.e. this type decl defines an enum type).

function P_Is_Record_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Return whether this type is a record type.

function P_Is_Array_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Return whether this type is an array type.

function P_Find_Derived_Types (Node : Base_Type_Decl'Class; Root : Ada_Node'Class; Origin : Ada_Node'Class; Imprecise_Fallback : Boolean) return Type_Decl_Array

Find types derived from self in the given root and its children.

function P_Is_Real_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is a real type or not.

function P_Is_Float_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is a float type or not.

function P_Is_Fixed_Point (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is a fixed point type or not.

function P_Is_Enum_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is an enum type

function P_Is_Access_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether Self is an access type or not

function P_Is_Char_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is a character type or not

function P_Discrete_Range (Node : Base_Type_Decl'Class) return Discrete_Range

Return the discrete range for this type decl, if applicable.

function P_Is_Discrete_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is a discrete type or not.

function P_Is_Int_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is an integer type or not.

function P_Accessed_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

If this type is an access type, or a type with an Implicit_Dereference aspect, return the type of a dereference of an instance of this type.

function P_Is_Tagged_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether type is tagged or not

function P_Base_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

Return the base type entity for this derived type declaration

function P_Base_Types (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl_Array

Return the list of base types for Self.

function P_Find_All_Derived_Types (Node : Base_Type_Decl'Class; Units : Analysis_Unit_Array; Imprecise_Fallback : Boolean) return Type_Decl_Array

Return the list of all types that inherit (directly or inderictly) from Self among the given units.

function P_Comp_Type (Node : Base_Type_Decl'Class; Is_Subscript : Boolean; Origin : Ada_Node'Class) return Base_Type_Decl

Return the component type of Self, if applicable. The component type is the type you’ll get if you call a value whose type is Self. So it can either be:

1. The component type for an array. 2. The return type for an access to function.

function P_Index_Type (Node : Base_Type_Decl'Class; Dim : Integer; Origin : Ada_Node'Class) return Base_Type_Decl

Return the index type for dimension dim for this type, if applicable.

function P_Is_Derived_Type (Node : Base_Type_Decl'Class; Other_Type : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Whether Self is derived from other_type.

function P_Is_Interface_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Return True iff this type declaration is an interface definition.

function P_Matching_Type (Node : Base_Type_Decl'Class; Expected_Type : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Return whether self matches expected_type.

function P_Canonical_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

Return the canonical type declaration for this type declaration. For subtypes, it will return the base type declaration.

function P_Previous_Part (Node : Base_Type_Decl'Class; Go_To_Incomplete : Boolean) return Base_Type_Decl

Returns the previous part for this type decl.

function P_Next_Part (Node : Base_Type_Decl'Class) return Base_Type_Decl

Returns the next part for this type decl.

function P_Full_View (Node : Base_Type_Decl'Class) return Base_Type_Decl

Return the full completion of this type.

function P_Is_Definite_Subtype (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Boolean

Returns whether this is a definite subtype.

For convenience, this will return False for incomplete types, even though the correct answer is more akin to “non applicable”.

function P_Is_Private (Node : Base_Type_Decl'Class) return Boolean

Whether node is a private view of corresponding type.

function P_Discriminants_List (Node : Base_Type_Decl'Class) return Base_Formal_Param_Decl_Array

Return the list of all discriminants of this type. If this type has no discriminant or only unknown discriminants, an empty list is returned.

function P_Root_Type (Node : Base_Type_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

Return the type that is at the root of the derivation hierarchy (ignoring secondary interfaces derivations for tagged types)

function P_Shapes (Node : Base_Type_Decl'Class; Include_Discriminants : Boolean; Origin : Ada_Node'Class) return Shape_Array

Must be called on a record (sub-)type declaration. Return all the possible shapes that a value of this record type can take. For example, consider the following record definition:

type R (A : Integer; B : Integer) is record X : Integer; case A is when 1 .. 10 => Y_1 : Integer; case B is when 1 .. 10 => Z_1 : Integer; when others => null; end case; when 11 .. 20 => Y_2 : Integer; case B is when 1 .. 10 => Z_2 : Integer; when others => null; end case; when others => null; end case; end record;

For this instance, this property will return the following results:

[ [X, Y_1, Z_1], [X, Y_1], [X, Y_2, Z_2], [X, Y_2], [X] ]

Attention

This property is inaccurate when called on a record extension which defines components under a certain condition C, and this same condition is used to define some components in the parent record: in that case, any feasible shape will in practice contain either both the components defined under condition C in the child record and the parent record, or none of them.

However, due to the simplified algorithm we use here to compute the feasible shapes, we will also return shapes that include the components of the child record but not the parent record, and conversely.

type Type_Decl

Type declarations that embed a type definition node.

function F_Discriminants (Node : Type_Decl'Class) return Discriminant_Part
function F_Type_Def (Node : Type_Decl'Class) return Type_Def
function P_Get_Primitives (Node : Type_Decl'Class; Only_Inherited : Boolean) return Basic_Decl_Array

Return the list of all primitive operations that are available on this type. If only_inherited is True, it will only return the primitives that are implicitly inherited by this type, discarding those explicitly defined on this type.

type Anonymous_Type_Decl

Anonymous type declaration (for anonymous array or access types).

type Array_Indices

Specification for array indexes.

type Array_Type_Def

Type definition for an array.

function F_Indices (Node : Array_Type_Def'Class) return Array_Indices
function F_Component_Type (Node : Array_Type_Def'Class) return Component_Def
type Aspect_Assoc

Name/expression association in an aspect.

function F_Id (Node : Aspect_Assoc'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Expr (Node : Aspect_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Contract_Cases
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Aspect_Assoc_List

List of AspectAssoc.

function List_Child (Node : Aspect_Assoc_List'Class; Index : Positive) return Aspect_Assoc

Return the Index‘th child of Node, or null if Node has no such child.

function Aspect_Assoc_List_First (Node : Aspect_Assoc_List) return Positive

Implementation detail for the Iterable aspect

function Aspect_Assoc_List_Next (Node : Aspect_Assoc_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Aspect_Assoc_List_Has_Element (Node : Aspect_Assoc_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Aspect_Assoc_List_Element (Node : Aspect_Assoc_List; Cursor : Positive) return Aspect_Assoc'Class

Implementation detail for the Iterable aspect

type Aspect_Clause

Base class for aspect clauses.

type Aspect_Spec

List of aspects in a declaration.

function F_Aspect_Assocs (Node : Aspect_Spec'Class) return Aspect_Assoc_List
type Assign_Stmt

Statement for assignments.

function F_Dest (Node : Assign_Stmt'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Expr (Node : Assign_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Basic_Assoc_List

List of BasicAssoc.

function List_Child (Node : Basic_Assoc_List'Class; Index : Positive) return Basic_Assoc

Return the Index‘th child of Node, or null if Node has no such child.

function Basic_Assoc_List_First (Node : Basic_Assoc_List) return Positive

Implementation detail for the Iterable aspect

function Basic_Assoc_List_Next (Node : Basic_Assoc_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Basic_Assoc_List_Has_Element (Node : Basic_Assoc_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Basic_Assoc_List_Element (Node : Basic_Assoc_List; Cursor : Positive) return Basic_Assoc'Class

Implementation detail for the Iterable aspect

type Assoc_List

List of associations.

function P_Zip_With_Params (Node : Assoc_List'Class; Imprecise_Fallback : Boolean) return Param_Actual_Array

Returns an array of pairs, associating formal parameters to actual expressions. The formals to match are retrieved by resolving the call which this AssocList represents the actuals of.

type At_Clause

Representation clause (for .. use at ...;).

function F_Name (Node : At_Clause'Class) return Base_Id

This field can contain one of the following nodes:

  • Char_Literal
  • Identifier
  • String_Literal
function F_Expr (Node : At_Clause'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Attribute_Def_Clause

Clause for an attribute definition (for ...'Attribute use ...;).

function F_Attribute_Expr (Node : Attribute_Def_Clause'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Expr (Node : Attribute_Def_Clause'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Attribute_Ref

Expression to reference an attribute.

function F_Prefix (Node : Attribute_Ref'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Attribute (Node : Attribute_Ref'Class) return Identifier
function F_Args (Node : Attribute_Ref'Class) return Ada_Node
type Base_Assoc

Abstract class for a key/value association, where the value is an expression.

function P_Assoc_Expr (Node : Base_Assoc'Class) return Expr

Returns the expression side of this assoc node.

type Base_Assoc_List

List of BaseAssoc.

function List_Child (Node : Base_Assoc_List'Class; Index : Positive) return Base_Assoc

Return the Index‘th child of Node, or null if Node has no such child.

function Base_Assoc_List_First (Node : Base_Assoc_List) return Positive

Implementation detail for the Iterable aspect

function Base_Assoc_List_Next (Node : Base_Assoc_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Base_Assoc_List_Has_Element (Node : Base_Assoc_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Base_Assoc_List_Element (Node : Base_Assoc_List; Cursor : Positive) return Base_Assoc'Class

Implementation detail for the Iterable aspect

type Base_Formal_Param_Decl

Base class for formal parameter declarations. This is used both for records components and for subprogram parameters.

This is a Libadalang abstraction, that has no ARM existence.

function P_Formal_Type (Node : Base_Formal_Param_Decl'Class; Origin : Ada_Node'Class) return Base_Type_Decl

Return the type for this formal.

type Base_Formal_Param_Holder

Base class for lists of formal parameters. This is used both for subprogram specifications and for records, so that we can share the matching and unpacking logic.

function P_Abstract_Formal_Params (Node : Base_Formal_Param_Holder'Class) return Base_Formal_Param_Decl_Array

Return the list of abstract formal parameters for this holder.

function P_Nb_Min_Params (Node : Base_Formal_Param_Holder'Class) return Integer

Return the minimum number of parameters this subprogram can be called while still being a legal call.

function P_Nb_Max_Params (Node : Base_Formal_Param_Holder'Class) return Integer

Return the maximum number of parameters this subprogram can be called while still being a legal call.

function P_Param_Types (Node : Base_Formal_Param_Holder'Class; Origin : Ada_Node'Class) return Base_Type_Decl_Array

Returns the type of each parameter of Self.

type Base_Loop_Stmt

Base class for loop statements.

function F_Spec (Node : Base_Loop_Stmt'Class) return Loop_Spec
function F_Stmts (Node : Base_Loop_Stmt'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
function F_End_Name (Node : Base_Loop_Stmt'Class) return End_Name
type Base_Package_Decl

Package declarations. Concrete instances of this class will be created in generic package declarations. Other non-generic package declarations will be instances of PackageDecl.

The behavior is the same, the only difference is that BasePackageDecl and PackageDecl have different behavior regarding lexical environments. In the case of generic package declarations, we use BasePackageDecl which has no env_spec, and the environment behavior is handled by the GenericPackageDecl instance.

function F_Package_Name (Node : Base_Package_Decl'Class) return Defining_Name
function F_Public_Part (Node : Base_Package_Decl'Class) return Public_Part
function F_Private_Part (Node : Base_Package_Decl'Class) return Private_Part
function F_End_Name (Node : Base_Package_Decl'Class) return End_Name
function P_Body_Part (Node : Base_Package_Decl'Class) return Package_Body

Return the PackageBody corresponding to this node.

type Base_Record_Def

Base class for record definitions.

function F_Components (Node : Base_Record_Def'Class) return Component_List
type Body_Node

Base class for an Ada body (RM 3.11). A body is the completion of a declaration.

function P_Previous_Part (Node : Body_Node'Class) return Basic_Decl

Return the previous part for this body. Might be a declaration or a body stub.

function P_Decl_Part (Node : Body_Node'Class) return Basic_Decl

Return the decl corresponding to this node if applicable.

function P_Subunit_Root (Node : Body_Node'Class) return Basic_Decl

If self is a subunit, return the body in which it is rooted.

type Base_Subp_Body

Base class for subprogram bodies.

function F_Overriding (Node : Base_Subp_Body'Class) return Overriding_Node
function F_Overriding (Node : Base_Subp_Body'Class) return Ada_Overriding_Node
function F_Subp_Spec (Node : Base_Subp_Body'Class) return Subp_Spec
type Base_Subp_Spec

Base class for subprogram specifications.

function P_Returns (Node : Base_Subp_Spec'Class) return Type_Expr

Syntax property. Return the type expression node corresponding to the return of this subprogram spec.

function P_Params (Node : Base_Subp_Spec'Class) return Param_Spec_Array

Returns the array of parameters specification for this subprogram spec.

function P_Primitive_Subp_Types (Node : Base_Subp_Spec'Class) return Base_Type_Decl_Array

Return the types of which this subprogram is a primitive of.

function P_Primitive_Subp_First_Type (Node : Base_Subp_Spec'Class) return Base_Type_Decl

Return the first type of which this subprogram is a primitive of.

function P_Primitive_Subp_Tagged_Type (Node : Base_Subp_Spec'Class) return Base_Type_Decl

If this subprogram is a primitive for a tagged type, then return this type.

function P_Return_Type (Node : Base_Subp_Spec'Class; Origin : Ada_Node'Class) return Base_Type_Decl

Returns the return type of Self, if applicable (e.g. if Self is a subprogram). Else, returns null.

type Base_Subtype_Decl

Base class for subtype declarations.

type Basic_Decl_List

List of BasicDecl.

This list node can contain one of the following nodes:

  • Number_Decl
  • Object_Decl
  • Single_Protected_Decl
  • Single_Task_Decl
function List_Child (Node : Basic_Decl_List'Class; Index : Positive) return Basic_Decl

Return the Index‘th child of Node, or null if Node has no such child.

function Basic_Decl_List_First (Node : Basic_Decl_List) return Positive

Implementation detail for the Iterable aspect

function Basic_Decl_List_Next (Node : Basic_Decl_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Basic_Decl_List_Has_Element (Node : Basic_Decl_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Basic_Decl_List_Element (Node : Basic_Decl_List; Cursor : Positive) return Basic_Decl'Class

Implementation detail for the Iterable aspect

type Block_Stmt

Base class for statement blocks.

type Begin_Block

Statement block with no declarative part.

function F_Stmts (Node : Begin_Block'Class) return Handled_Stmts
function F_End_Name (Node : Begin_Block'Class) return End_Name
type Bin_Op

Binary expression.

function F_Left (Node : Bin_Op'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Op (Node : Bin_Op'Class) return Op

This field can contain one of the following nodes:

  • Op_And
  • Op_And_Then
  • Op_Concat
  • Op_Div
  • Op_Double_Dot
  • Op_Eq
  • Op_Gt
  • Op_Gte
  • Op_Lt
  • Op_Lte
  • Op_Minus
  • Op_Mod
  • Op_Mult
  • Op_Neq
  • Op_Or
  • Op_Or_Else
  • Op_Plus
  • Op_Pow
  • Op_Rem
  • Op_Xor
function F_Op (Node : Bin_Op'Class) return Ada_Op
function F_Right (Node : Bin_Op'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Body_Stub

Base class for a body stub (RM 10.1.3). A body stub is meant to be completed by .

type Box_Expr

Box expression (<>).

type Bracket_Aggregate

Bracket array or container aggregate (Ada 2020).

type Delta_Aggregate
type Bracket_Delta_Aggregate

Bracket delta aggregate (Ada 2020).

type Call_Expr

Represent a syntactic call expression.

At the semantic level, this can be either a subprogram call, an array subcomponent access expression, an array slice or a type conversion.

function F_Name (Node : Call_Expr'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Suffix (Node : Call_Expr'Class) return Ada_Node

This field can contain one of the following nodes:

  • Attribute_Ref
  • Basic_Assoc_List
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function P_Is_Array_Slice (Node : Call_Expr'Class) return Boolean

Return whether this CallExpr is actually an access to a slice of the array denoted by the prefix of this CallExpr.

type Call_Stmt

Statement for entry or procedure calls.

function F_Call (Node : Call_Stmt'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type Case_Expr

case expression.

function F_Expr (Node : Case_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Cases (Node : Case_Expr'Class) return Case_Expr_Alternative_List
type Case_Expr_Alternative

Alternative in a case expression (when ... => ...).

function F_Choices (Node : Case_Expr_Alternative'Class) return Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Expr (Node : Case_Expr_Alternative'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Case_Expr_Alternative_List

List of CaseExprAlternative.

function List_Child (Node : Case_Expr_Alternative_List'Class; Index : Positive) return Case_Expr_Alternative

Return the Index‘th child of Node, or null if Node has no such child.

function Case_Expr_Alternative_List_First (Node : Case_Expr_Alternative_List) return Positive

Implementation detail for the Iterable aspect

function Case_Expr_Alternative_List_Next (Node : Case_Expr_Alternative_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Case_Expr_Alternative_List_Has_Element (Node : Case_Expr_Alternative_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Case_Expr_Alternative_List_Element (Node : Case_Expr_Alternative_List; Cursor : Positive) return Case_Expr_Alternative'Class

Implementation detail for the Iterable aspect

type Case_Stmt

case statement.

function F_Expr (Node : Case_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Alternatives (Node : Case_Stmt'Class) return Case_Stmt_Alternative_List
type Case_Stmt_Alternative

Alternative in a case statement (when ... => ...).

function F_Choices (Node : Case_Stmt_Alternative'Class) return Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Stmts (Node : Case_Stmt_Alternative'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Case_Stmt_Alternative_List

List of CaseStmtAlternative.

function List_Child (Node : Case_Stmt_Alternative_List'Class; Index : Positive) return Case_Stmt_Alternative

Return the Index‘th child of Node, or null if Node has no such child.

function Case_Stmt_Alternative_List_First (Node : Case_Stmt_Alternative_List) return Positive

Implementation detail for the Iterable aspect

function Case_Stmt_Alternative_List_Next (Node : Case_Stmt_Alternative_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Case_Stmt_Alternative_List_Has_Element (Node : Case_Stmt_Alternative_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Case_Stmt_Alternative_List_Element (Node : Case_Stmt_Alternative_List; Cursor : Positive) return Case_Stmt_Alternative'Class

Implementation detail for the Iterable aspect

type Char_Literal

Character literal.

function P_Denoted_Value (Node : Char_Literal'Class) return Character_Type

Return the value that this literal denotes.

type Classwide_Type_Decl

Synthetic node (not parsed, generated from a property call). Refers to the classwide type for a given tagged type. The aim is that those be mostly equivalent to their non-classwide type, except for some resolution rules.

type Compilation_Unit

Root node for all Ada analysis units.

function F_Prelude (Node : Compilation_Unit'Class) return Ada_Node_List

with, use or pragma statements.

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Use_Clause
  • With_Clause
function F_Body (Node : Compilation_Unit'Class) return Ada_Node

This field can contain one of the following nodes:

  • Library_Item
  • Subunit
function F_Pragmas (Node : Compilation_Unit'Class) return Pragma_Node_List
function P_Syntactic_Fully_Qualified_Name (Node : Compilation_Unit'Class) return Unbounded_Text_Type_Array

Return the syntactic fully qualified name of this compilation unit.

function P_Unit_Kind (Node : Compilation_Unit'Class) return Analysis_Unit_Kind

Return the kind corresponding to this analysis unit.

function P_Withed_Units (Node : Compilation_Unit'Class) return Compilation_Unit_Array

Look for all “with” clauses at the top of this compilation unit and return all the compilation units designated by them.

function P_Imported_Units (Node : Compilation_Unit'Class) return Compilation_Unit_Array

Return all the compilation units that are directly imported by this one. This includes “with”ed units as well as the direct parent unit.

function P_Unit_Dependencies (Node : Compilation_Unit'Class) return Compilation_Unit_Array

Return the list of all the compilation units that are (direct and indirect) dependencies of this one.

function P_Decl (Node : Compilation_Unit'Class) return Basic_Decl

Get the root basic decl defined in this compilation unit.

function P_Is_Preelaborable (Node : Compilation_Unit'Class) return Boolean

Whether this compilation unit is preelaborable or not.

type Compilation_Unit_List

List of CompilationUnit.

function List_Child (Node : Compilation_Unit_List'Class; Index : Positive) return Compilation_Unit

Return the Index‘th child of Node, or null if Node has no such child.

function Compilation_Unit_List_First (Node : Compilation_Unit_List) return Positive

Implementation detail for the Iterable aspect

function Compilation_Unit_List_Next (Node : Compilation_Unit_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Compilation_Unit_List_Has_Element (Node : Compilation_Unit_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Compilation_Unit_List_Element (Node : Compilation_Unit_List; Cursor : Positive) return Compilation_Unit'Class

Implementation detail for the Iterable aspect

type Component_Clause

Representation clause for a single component.

function F_Id (Node : Component_Clause'Class) return Identifier
function F_Position (Node : Component_Clause'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Component_Clause'Class) return Range_Spec
type Component_Decl

Declaration for a component.

function F_Ids (Node : Component_Decl'Class) return Defining_Name_List
function F_Component_Def (Node : Component_Decl'Class) return Component_Def
function F_Default_Expr (Node : Component_Decl'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Component_Def

Definition for a component.

function F_Has_Aliased (Node : Component_Def'Class) return Aliased_Node
function F_Has_Aliased (Node : Component_Def'Class) return Boolean
function F_Has_Constant (Node : Component_Def'Class) return Constant_Node
function F_Has_Constant (Node : Component_Def'Class) return Boolean
function F_Type_Expr (Node : Component_Def'Class) return Type_Expr

This field can contain one of the following nodes:

  • Anonymous_Type
  • Subtype_Indication
type Component_List

List of component declarations.

function F_Components (Node : Component_List'Class) return Ada_Node_List
function F_Variant_Part (Node : Component_List'Class) return Variant_Part
type Concrete_Formal_Subp_Decl

Formal declaration for a concrete subprogram.

type Constant_Node

Qualifier for the constant keyword.

function P_As_Bool (Node : Constant_Node'Class) return Boolean

Return whether this is an instance of ConstantPresent

type Constant_Absent
type Constant_Present
type Constrained_Array_Indices

Constrained specification for array indexes.

function F_List (Node : Constrained_Array_Indices'Class) return Constraint_List

This field contains a list that itself contains one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Subtype_Indication
  • Target_Name
type Subtype_Indication

Reference to a type by name.

function F_Has_Not_Null (Node : Subtype_Indication'Class) return Not_Null
function F_Has_Not_Null (Node : Subtype_Indication'Class) return Boolean
function F_Name (Node : Subtype_Indication'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Constraint (Node : Subtype_Indication'Class) return Constraint
function P_Is_Static_Subtype (Node : Subtype_Indication'Class; Imprecise_Fallback : Boolean) return Boolean

Returns whether Self denotes a static subtype or not.

type Constrained_Subtype_Indication

Reference to a type with a range constraint.

type Constraint

Base class for type constraints.

type Constraint_List

List of constraints.

This list node can contain one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Subtype_Indication
  • Target_Name
type Contract_Case_Assoc

Single association for the Contract_Case aspect.

function F_Guard (Node : Contract_Case_Assoc'Class) return Ada_Node

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Consequence (Node : Contract_Case_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Contract_Case_Assoc_List

List of ContractCaseAssoc.

function List_Child (Node : Contract_Case_Assoc_List'Class; Index : Positive) return Contract_Case_Assoc

Return the Index‘th child of Node, or null if Node has no such child.

function Contract_Case_Assoc_List_First (Node : Contract_Case_Assoc_List) return Positive

Implementation detail for the Iterable aspect

function Contract_Case_Assoc_List_Next (Node : Contract_Case_Assoc_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Contract_Case_Assoc_List_Has_Element (Node : Contract_Case_Assoc_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Contract_Case_Assoc_List_Element (Node : Contract_Case_Assoc_List; Cursor : Positive) return Contract_Case_Assoc'Class

Implementation detail for the Iterable aspect

type Contract_Cases

List of associations for the Contract_Case aspect.

function F_Contract_Cases (Node : Contract_Cases'Class) return Contract_Case_Assoc_List
type Real_Type_Def

Type definition for real numbers.

type Decimal_Fixed_Point_Def

Type definition for decimal fixed-point numbers.

function F_Delta (Node : Decimal_Fixed_Point_Def'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Digits (Node : Decimal_Fixed_Point_Def'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Decimal_Fixed_Point_Def'Class) return Range_Spec
type Decl_Block

Statement block with a declarative part.

function F_Decls (Node : Decl_Block'Class) return Declarative_Part
function F_Stmts (Node : Decl_Block'Class) return Handled_Stmts
function F_End_Name (Node : Decl_Block'Class) return End_Name
type Decl_Expr

Declare expression (Ada 2020).

function F_Decls (Node : Decl_Expr'Class) return Basic_Decl_List

This field contains a list that itself contains one of the following nodes:

  • Number_Decl
  • Object_Decl
  • Single_Protected_Decl
  • Single_Task_Decl
function F_Expr (Node : Decl_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Decl_List

List of declarations.

This list node can contain one of the following nodes:

  • Abstract_Subp_Decl
  • Aspect_Clause
  • Component_Decl
  • Entry_Decl
  • Expr_Function
  • Null_Subp_Decl
  • Pragma_Node
  • Subp_Decl
  • Subp_Renaming_Decl
type Declarative_Part

List of declarations.

function F_Decls (Node : Declarative_Part'Class) return Ada_Node_List

This field contains a list that itself contains one of the following nodes:

  • Abstract_Subp_Decl
  • Aspect_Clause
  • Body_Node
  • Component_Decl
  • Entry_Decl
  • Error_Decl
  • Exception_Decl
  • Generic_Decl
  • Generic_Instantiation
  • Generic_Renaming_Decl
  • Incomplete_Type_Decl
  • Number_Decl
  • Object_Decl
  • Package_Decl
  • Package_Renaming_Decl
  • Pragma_Node
  • Protected_Type_Decl
  • Single_Protected_Decl
  • Single_Task_Decl
  • Subp_Decl
  • Subtype_Decl
  • Task_Type_Decl
  • Type_Decl
  • Use_Clause
type Defining_Name

Name that defines an entity.

function Create_Param_Actual (Param : Defining_Name'Class; Actual : Expr'Class) return Param_Actual
function Create_Refd_Def (Def_Name : Defining_Name'Class; Kind : Ref_Result_Kind) return Refd_Def
function F_Name (Node : Defining_Name'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function P_Basic_Decl (Node : Defining_Name'Class) return Basic_Decl

Returns this DefiningName’s basic declaration

function P_Find_Refs (Node : Defining_Name'Class; Root : Ada_Node'Class; Origin : Ada_Node'Class; Imprecise_Fallback : Boolean) return Ref_Result_Array

Find all references to this defining name in the given root and its children.

function P_Find_All_References (Node : Defining_Name'Class; Units : Analysis_Unit_Array; Imprecise_Fallback : Boolean) return Ref_Result_Array

Searches all references to this defining name in the given list of units.

function P_Find_All_Calls (Node : Defining_Name'Class; Units : Analysis_Unit_Array; Imprecise_Fallback : Boolean) return Ref_Result_Array

Return the list of all possible calls to the subprogram which Self is the defining name of.

This will return the name corresponding to the call, excluding the parameters if there are any. For instance, it will return A for the A (B) call.

Note

This does not yet support calls done inside generics.

function P_Next_Part (Node : Defining_Name'Class) return Defining_Name

Like BasicDecl.next_part_for_decl on a defining name

function P_Previous_Part (Node : Defining_Name'Class) return Defining_Name

Like BasicDecl.previous_part_for_decl on a defining name

function P_Canonical_Part (Node : Defining_Name'Class) return Defining_Name

Like BasicDecl.canonical_part on a defining name

type Defining_Name_List

List of DefiningName.

function List_Child (Node : Defining_Name_List'Class; Index : Positive) return Defining_Name

Return the Index‘th child of Node, or null if Node has no such child.

function Defining_Name_List_First (Node : Defining_Name_List) return Positive

Implementation detail for the Iterable aspect

function Defining_Name_List_Next (Node : Defining_Name_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Defining_Name_List_Has_Element (Node : Defining_Name_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Defining_Name_List_Element (Node : Defining_Name_List; Cursor : Positive) return Defining_Name'Class

Implementation detail for the Iterable aspect

type Delay_Stmt

delay statement.

function F_Has_Until (Node : Delay_Stmt'Class) return Until_Node
function F_Has_Until (Node : Delay_Stmt'Class) return Boolean
function F_Expr (Node : Delay_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Delta_Constraint

Delta and range type constraint.

function F_Digits (Node : Delta_Constraint'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Delta_Constraint'Class) return Range_Spec
type Derived_Type_Def

Type definition for a derived type.

function F_Has_Abstract (Node : Derived_Type_Def'Class) return Abstract_Node
function F_Has_Abstract (Node : Derived_Type_Def'Class) return Boolean
function F_Has_Limited (Node : Derived_Type_Def'Class) return Limited_Node
function F_Has_Limited (Node : Derived_Type_Def'Class) return Boolean
function F_Has_Synchronized (Node : Derived_Type_Def'Class) return Synchronized_Node
function F_Has_Synchronized (Node : Derived_Type_Def'Class) return Boolean
function F_Subtype_Indication (Node : Derived_Type_Def'Class) return Subtype_Indication
function F_Interfaces (Node : Derived_Type_Def'Class) return Parent_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Record_Extension (Node : Derived_Type_Def'Class) return Base_Record_Def
function F_Has_With_Private (Node : Derived_Type_Def'Class) return With_Private
function F_Has_With_Private (Node : Derived_Type_Def'Class) return Boolean
type Digits_Constraint

Digits and range type constraint.

function F_Digits (Node : Digits_Constraint'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Digits_Constraint'Class) return Range_Spec
type Discrete_Base_Subtype_Decl

Specific BaseSubtypeDecl synthetic subclass for the base type of scalar types.

type Discrete_Subtype_Indication

Reference to a type with a general constraint.

type Discrete_Subtype_Name

Subtype name for membership test expressions.

function F_Subtype (Node : Discrete_Subtype_Name'Class) return Discrete_Subtype_Indication
type Discriminant_Assoc

Association of discriminant names to an expression.

function F_Ids (Node : Discriminant_Assoc'Class) return Discriminant_Choice_List
function F_Discr_Expr (Node : Discriminant_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Identifier_List

List of Identifier.

function List_Child (Node : Identifier_List'Class; Index : Positive) return Identifier

Return the Index‘th child of Node, or null if Node has no such child.

function Identifier_List_First (Node : Identifier_List) return Positive

Implementation detail for the Iterable aspect

function Identifier_List_Next (Node : Identifier_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Identifier_List_Has_Element (Node : Identifier_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Identifier_List_Element (Node : Identifier_List; Cursor : Positive) return Identifier'Class

Implementation detail for the Iterable aspect

type Discriminant_Choice_List

List of discriminant associations.

type Discriminant_Constraint

List of constraints that relate to type discriminants.

function F_Constraints (Node : Discriminant_Constraint'Class) return Assoc_List

This field contains a list that itself contains one of the following nodes:

  • Discriminant_Assoc
type Discriminant_Part

Specification for discriminants in type declarations.

type Discriminant_Spec

Known list of discriminants in type declarations.

function F_Ids (Node : Discriminant_Spec'Class) return Defining_Name_List
function F_Type_Expr (Node : Discriminant_Spec'Class) return Type_Expr

This field can contain one of the following nodes:

  • Anonymous_Type
  • Subtype_Indication
function F_Default_Expr (Node : Discriminant_Spec'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Discriminant_Spec_List

List of DiscriminantSpec.

function List_Child (Node : Discriminant_Spec_List'Class; Index : Positive) return Discriminant_Spec

Return the Index‘th child of Node, or null if Node has no such child.

function Discriminant_Spec_List_First (Node : Discriminant_Spec_List) return Positive

Implementation detail for the Iterable aspect

function Discriminant_Spec_List_Next (Node : Discriminant_Spec_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Discriminant_Spec_List_Has_Element (Node : Discriminant_Spec_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Discriminant_Spec_List_Element (Node : Discriminant_Spec_List; Cursor : Positive) return Discriminant_Spec'Class

Implementation detail for the Iterable aspect

type Dotted_Name

Name to select a suffix in a prefix.

function F_Prefix (Node : Dotted_Name'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Suffix (Node : Dotted_Name'Class) return Base_Id

This field can contain one of the following nodes:

  • Char_Literal
  • Identifier
  • String_Literal
type Elsif_Expr_Part

elsif block, part of an if expression.

function F_Cond_Expr (Node : Elsif_Expr_Part'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Then_Expr (Node : Elsif_Expr_Part'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Elsif_Expr_Part_List

List of ElsifExprPart.

function List_Child (Node : Elsif_Expr_Part_List'Class; Index : Positive) return Elsif_Expr_Part

Return the Index‘th child of Node, or null if Node has no such child.

function Elsif_Expr_Part_List_First (Node : Elsif_Expr_Part_List) return Positive

Implementation detail for the Iterable aspect

function Elsif_Expr_Part_List_Next (Node : Elsif_Expr_Part_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Elsif_Expr_Part_List_Has_Element (Node : Elsif_Expr_Part_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Elsif_Expr_Part_List_Element (Node : Elsif_Expr_Part_List; Cursor : Positive) return Elsif_Expr_Part'Class

Implementation detail for the Iterable aspect

type Elsif_Stmt_Part

elsif part in an if statement block.

function F_Cond_Expr (Node : Elsif_Stmt_Part'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Stmts (Node : Elsif_Stmt_Part'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Elsif_Stmt_Part_List

List of ElsifStmtPart.

function List_Child (Node : Elsif_Stmt_Part_List'Class; Index : Positive) return Elsif_Stmt_Part

Return the Index‘th child of Node, or null if Node has no such child.

function Elsif_Stmt_Part_List_First (Node : Elsif_Stmt_Part_List) return Positive

Implementation detail for the Iterable aspect

function Elsif_Stmt_Part_List_Next (Node : Elsif_Stmt_Part_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Elsif_Stmt_Part_List_Has_Element (Node : Elsif_Stmt_Part_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Elsif_Stmt_Part_List_Element (Node : Elsif_Stmt_Part_List; Cursor : Positive) return Elsif_Stmt_Part'Class

Implementation detail for the Iterable aspect

type End_Name

Entity name in end ...; syntactic constructs.

function F_Name (Node : End_Name'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function P_Basic_Decl (Node : End_Name'Class) return Basic_Decl

Returns this EndName’s basic declaration

type Entry_Body

Entry body.

function F_Entry_Name (Node : Entry_Body'Class) return Defining_Name
function F_Index_Spec (Node : Entry_Body'Class) return Entry_Index_Spec
function F_Params (Node : Entry_Body'Class) return Entry_Completion_Formal_Params
function F_Barrier (Node : Entry_Body'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Decls (Node : Entry_Body'Class) return Declarative_Part
function F_Stmts (Node : Entry_Body'Class) return Handled_Stmts
function F_End_Name (Node : Entry_Body'Class) return End_Name
type Entry_Completion_Formal_Params

Formal parameters for the completion of an EntryDecl (either an EntryBody or an AcceptStmt).

function F_Params (Node : Entry_Completion_Formal_Params'Class) return Params
type Entry_Decl

Entry declaration.

function F_Overriding (Node : Entry_Decl'Class) return Overriding_Node
function F_Overriding (Node : Entry_Decl'Class) return Ada_Overriding_Node
function F_Spec (Node : Entry_Decl'Class) return Entry_Spec
type Entry_Index_Spec

Index specification for an entry body.

function F_Id (Node : Entry_Index_Spec'Class) return Defining_Name
function F_Subtype (Node : Entry_Index_Spec'Class) return Ada_Node

This field can contain one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Subtype_Indication
  • Target_Name
type Entry_Spec

Entry specification.

function F_Entry_Name (Node : Entry_Spec'Class) return Defining_Name
function F_Family_Type (Node : Entry_Spec'Class) return Ada_Node

This field can contain one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Subtype_Indication
  • Target_Name
function F_Entry_Params (Node : Entry_Spec'Class) return Params
type Enum_Lit_Synth_Type_Expr

Synthetic node. Represents the type expression for an enum literal.

type Enum_Literal_Decl

Declaration for an enumeration literal.

function F_Name (Node : Enum_Literal_Decl'Class) return Defining_Name
function P_Enum_Type (Node : Enum_Literal_Decl'Class) return Type_Decl

Return the enum type corresponding to this enum literal.

type Enum_Literal_Decl_List

List of EnumLiteralDecl.

function List_Child (Node : Enum_Literal_Decl_List'Class; Index : Positive) return Enum_Literal_Decl

Return the Index‘th child of Node, or null if Node has no such child.

function Enum_Literal_Decl_List_First (Node : Enum_Literal_Decl_List) return Positive

Implementation detail for the Iterable aspect

function Enum_Literal_Decl_List_Next (Node : Enum_Literal_Decl_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Enum_Literal_Decl_List_Has_Element (Node : Enum_Literal_Decl_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Enum_Literal_Decl_List_Element (Node : Enum_Literal_Decl_List; Cursor : Positive) return Enum_Literal_Decl'Class

Implementation detail for the Iterable aspect

type Enum_Rep_Clause

Representation clause for enumeration types.

function F_Type_Name (Node : Enum_Rep_Clause'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Aggregate (Node : Enum_Rep_Clause'Class) return Base_Aggregate
type Enum_Subp_Spec

Synthetic node for the abstract subprogram spec of an enum literal.

NOTE: This has no existence in the ARM. While enum literals are functions semantically, they’re not such syntactically.

type Enum_Type_Def

Type definition for enumerations.

function F_Enum_Literals (Node : Enum_Type_Def'Class) return Enum_Literal_Decl_List
type Error_Decl

Placeholder node for syntax errors in lists of declarations.

type Error_Stmt

Placeholder node for syntax errors in lists of statements.

type Exception_Decl

Exception declarations.

function F_Ids (Node : Exception_Decl'Class) return Defining_Name_List
function F_Renames (Node : Exception_Decl'Class) return Renaming_Clause
type Exception_Handler

Exception handler.

function F_Exception_Name (Node : Exception_Handler'Class) return Defining_Name
function F_Handled_Exceptions (Node : Exception_Handler'Class) return Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Others_Designator
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Stmts (Node : Exception_Handler'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Exit_Stmt

exit statement.

function F_Loop_Name (Node : Exit_Stmt'Class) return Identifier
function F_Cond_Expr (Node : Exit_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Explicit_Deref

Explicit dereference expression (.all).

function F_Prefix (Node : Explicit_Deref'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type Expr_List

List of Expr.

This list node can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Name
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function List_Child (Node : Expr_List'Class; Index : Positive) return Expr

Return the Index‘th child of Node, or null if Node has no such child.

function Expr_List_First (Node : Expr_List) return Positive

Implementation detail for the Iterable aspect

function Expr_List_Next (Node : Expr_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Expr_List_Has_Element (Node : Expr_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Expr_List_Element (Node : Expr_List; Cursor : Positive) return Expr'Class

Implementation detail for the Iterable aspect

type Expr_Alternatives_List

List of alternatives in a membership test expression.

This list node can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Name
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Expr_Function

Expression function.

function F_Expr (Node : Expr_Function'Class) return Expr

This field can contain one of the following nodes:

  • Base_Aggregate
  • Paren_Expr
type Extended_Return_Stmt

Extended return statement.

function F_Decl (Node : Extended_Return_Stmt'Class) return Extended_Return_Stmt_Object_Decl
function F_Stmts (Node : Extended_Return_Stmt'Class) return Handled_Stmts
type Extended_Return_Stmt_Object_Decl

Object declaration that is part of an extended return statement.

type Floating_Point_Def

Type definition for floating-point numbers.

function F_Num_Digits (Node : Floating_Point_Def'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Floating_Point_Def'Class) return Range_Spec
type Loop_Spec

Base class for loop specifications.

type For_Loop_Spec

Specification for a for loop.

function F_Var_Decl (Node : For_Loop_Spec'Class) return For_Loop_Var_Decl
function F_Loop_Type (Node : For_Loop_Spec'Class) return Iter_Type
function F_Loop_Type (Node : For_Loop_Spec'Class) return Ada_Iter_Type
function F_Has_Reverse (Node : For_Loop_Spec'Class) return Reverse_Node
function F_Has_Reverse (Node : For_Loop_Spec'Class) return Boolean
function F_Iter_Expr (Node : For_Loop_Spec'Class) return Ada_Node

This field can contain one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type For_Loop_Stmt

Statement for for loops (for ... loop ... end loop;).

type For_Loop_Var_Decl

Declaration for the controlling variable in a for loop.

function F_Id (Node : For_Loop_Var_Decl'Class) return Defining_Name
function F_Id_Type (Node : For_Loop_Var_Decl'Class) return Subtype_Indication
type Formal_Discrete_Type_Def

Type definition for discrete types in generic formals.

type Generic_Decl

Base class for generic declarations.

function F_Formal_Part (Node : Generic_Decl'Class) return Generic_Formal_Part
type Generic_Formal

Enclosing declaration for a generic formal. The real declaration is accessible via the decl field.

function F_Decl (Node : Generic_Formal'Class) return Basic_Decl

This field can contain one of the following nodes:

  • Formal_Subp_Decl
  • Generic_Instantiation
  • Incomplete_Type_Decl
  • Number_Decl
  • Object_Decl
  • Single_Protected_Decl
  • Single_Task_Decl
  • Type_Decl
type Generic_Formal_Obj_Decl

Formal declaration for an object.

type Generic_Formal_Package

Formal declaration for a package.

type Generic_Formal_Part

List of declaration for generic formals.

function F_Decls (Node : Generic_Formal_Part'Class) return Ada_Node_List

This field contains a list that itself contains one of the following nodes:

  • Generic_Formal
  • Pragma_Node
  • Use_Clause
type Generic_Formal_Subp_Decl

Formal declaration for a subprogram.

type Generic_Formal_Type_Decl

Formal declaration for a type.

type Generic_Instantiation

Instantiations of generics.

function P_Designated_Generic_Decl (Node : Generic_Instantiation'Class) return Basic_Decl

Return the generic decl entity designated by this instantiation, containing the generic context. This is equivalent to the expanded generic unit in GNAT.

type Generic_Package_Decl

Generic package declaration.

function F_Package_Decl (Node : Generic_Package_Decl'Class) return Generic_Package_Internal
function P_Body_Part (Node : Generic_Package_Decl'Class) return Package_Body

Return the PackageBody corresponding to this node, or null if there is none.

type Generic_Package_Instantiation

Instantiations of a generic package.

function F_Name (Node : Generic_Package_Instantiation'Class) return Defining_Name
function F_Generic_Pkg_Name (Node : Generic_Package_Instantiation'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Params (Node : Generic_Package_Instantiation'Class) return Assoc_List

This field contains a list that itself contains one of the following nodes:

  • Param_Assoc
type Generic_Package_Internal

This class denotes the internal package contained by a GenericPackageDecl.

type Generic_Renaming_Decl

Base node for all generic renaming declarations.

type Generic_Package_Renaming_Decl

Declaration for a generic package renaming.

function F_Name (Node : Generic_Package_Renaming_Decl'Class) return Defining_Name
function F_Renames (Node : Generic_Package_Renaming_Decl'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Generic_Subp_Decl

Generic subprogram declaration.

function F_Subp_Decl (Node : Generic_Subp_Decl'Class) return Generic_Subp_Internal
function P_Body_Part (Node : Generic_Subp_Decl'Class) return Base_Subp_Body

Return the BaseSubpBody corresponding to this node.

type Generic_Subp_Instantiation

Instantiations of a generic subprogram.

function F_Overriding (Node : Generic_Subp_Instantiation'Class) return Overriding_Node
function F_Overriding (Node : Generic_Subp_Instantiation'Class) return Ada_Overriding_Node
function F_Kind (Node : Generic_Subp_Instantiation'Class) return Subp_Kind
function F_Kind (Node : Generic_Subp_Instantiation'Class) return Ada_Subp_Kind
function F_Subp_Name (Node : Generic_Subp_Instantiation'Class) return Defining_Name
function F_Generic_Subp_Name (Node : Generic_Subp_Instantiation'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Params (Node : Generic_Subp_Instantiation'Class) return Assoc_List

This field contains a list that itself contains one of the following nodes:

  • Param_Assoc
function P_Designated_Subp (Node : Generic_Subp_Instantiation'Class) return Ada_Node

Return the subprogram decl designated by this instantiation.

type Generic_Subp_Internal

Internal node for generic subprograms.

function F_Subp_Spec (Node : Generic_Subp_Internal'Class) return Subp_Spec
type Generic_Subp_Renaming_Decl

Declaration for a generic subprogram renaming.

function F_Kind (Node : Generic_Subp_Renaming_Decl'Class) return Subp_Kind
function F_Kind (Node : Generic_Subp_Renaming_Decl'Class) return Ada_Subp_Kind
function F_Name (Node : Generic_Subp_Renaming_Decl'Class) return Defining_Name
function F_Renames (Node : Generic_Subp_Renaming_Decl'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Goto_Stmt

goto statement.

function F_Label_Name (Node : Goto_Stmt'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Handled_Stmts

List of statements, with optional exception handlers.

function F_Stmts (Node : Handled_Stmts'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
function F_Exceptions (Node : Handled_Stmts'Class) return Ada_Node_List

This field contains a list that itself contains one of the following nodes:

  • Exception_Handler
  • Pragma_Node
type If_Expr

if expression.

function F_Cond_Expr (Node : If_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Then_Expr (Node : If_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Alternatives (Node : If_Expr'Class) return Elsif_Expr_Part_List
function F_Else_Expr (Node : If_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type If_Stmt

if statement block.

function F_Cond_Expr (Node : If_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Then_Stmts (Node : If_Stmt'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
function F_Alternatives (Node : If_Stmt'Class) return Elsif_Stmt_Part_List
function F_Else_Stmts (Node : If_Stmt'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Incomplete_Type_Decl

Incomplete declaration for a type.

function F_Discriminants (Node : Incomplete_Type_Decl'Class) return Discriminant_Part
type Incomplete_Tagged_Type_Decl

Incomplete declaration for a tagged type.

function F_Has_Abstract (Node : Incomplete_Tagged_Type_Decl'Class) return Abstract_Node
function F_Has_Abstract (Node : Incomplete_Tagged_Type_Decl'Class) return Boolean
type Index_Constraint

List of type constraints.

function F_Constraints (Node : Index_Constraint'Class) return Constraint_List

This field contains a list that itself contains one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Subtype_Indication
  • Target_Name
type Num_Literal

Base class for number literals.

type Int_Literal

Literal for an integer.

function P_Denoted_Value (Node : Int_Literal'Class) return Big_Integer

Return the value that this literal denotes.

type Interface_Kind

Kind of interface type.

type Interface_Kind_Limited
type Interface_Kind_Protected
type Interface_Kind_Synchronized
type Interface_Kind_Task
type Interface_Type_Def

Type definition for an interface.

function F_Interface_Kind (Node : Interface_Type_Def'Class) return Interface_Kind
function F_Interface_Kind (Node : Interface_Type_Def'Class) return Ada_Interface_Kind
function F_Interfaces (Node : Interface_Type_Def'Class) return Parent_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Iter_Type

Iteration type for for loops.

type Iter_Type_In
type Iter_Type_Of
type Iterated_Assoc

Iterated association (Ada 2020).

function F_Spec (Node : Iterated_Assoc'Class) return For_Loop_Spec
function F_R_Expr (Node : Iterated_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Known_Discriminant_Part

Known list of discriminants in type declarations.

function F_Discr_Specs (Node : Known_Discriminant_Part'Class) return Discriminant_Spec_List
type Label

Statement to declare a code label.

function F_Decl (Node : Label'Class) return Label_Decl
type Label_Decl

Declaration for a code label.

function F_Name (Node : Label_Decl'Class) return Defining_Name
type Library_Item

Library item in a compilation unit.

function F_Has_Private (Node : Library_Item'Class) return Private_Node
function F_Has_Private (Node : Library_Item'Class) return Boolean
function F_Item (Node : Library_Item'Class) return Basic_Decl

This field can contain one of the following nodes:

  • Abstract_Subp_Decl
  • Base_Subp_Body
  • Error_Decl
  • Generic_Decl
  • Generic_Instantiation
  • Generic_Renaming_Decl
  • Package_Body
  • Package_Decl
  • Package_Renaming_Decl
  • Subp_Decl
type Limited_Node

Qualifier for the limited keyword.

function P_As_Bool (Node : Limited_Node'Class) return Boolean

Return whether this is an instance of LimitedPresent

type Limited_Absent
type Limited_Present
type Loop_Stmt

Statement for simple loops (loop ... end loop;).

type Membership_Expr

Represent a membership test (in/not in operators).

Note that we don’t consider them as binary operators since multiple expressions on the right hand side are allowed.

function F_Expr (Node : Membership_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Op (Node : Membership_Expr'Class) return Op

This field can contain one of the following nodes:

  • Op_In
  • Op_Not_In
function F_Op (Node : Membership_Expr'Class) return Ada_Op
function F_Membership_Exprs (Node : Membership_Expr'Class) return Expr_Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Name
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Mod_Int_Type_Def

Type definition for a modular integer type.

function F_Expr (Node : Mod_Int_Type_Def'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Mode

Syntactic indicators for passing modes in formals.

type Mode_Default
type Mode_In
type Mode_In_Out
type Mode_Out
type Multi_Dim_Array_Assoc

Association used for multi-dimension array aggregates.

type Name_List

List of Name.

This list node can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function List_Child (Node : Name_List'Class; Index : Positive) return Name

Return the Index‘th child of Node, or null if Node has no such child.

function Name_List_First (Node : Name_List) return Positive

Implementation detail for the Iterable aspect

function Name_List_Next (Node : Name_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Name_List_Has_Element (Node : Name_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Name_List_Element (Node : Name_List; Cursor : Positive) return Name'Class

Implementation detail for the Iterable aspect

type Named_Stmt

Wrapper class, used for composite statements that can be named (declare blocks, loops). This allows to both have a BasicDecl for the named entity declared, and a CompositeStmt for the statement hierarchy.

function F_Decl (Node : Named_Stmt'Class) return Named_Stmt_Decl
function F_Stmt (Node : Named_Stmt'Class) return Composite_Stmt

This field can contain one of the following nodes:

  • Base_Loop_Stmt
  • Block_Stmt
type Named_Stmt_Decl

BasicDecl that is always the declaration inside a named statement.

function F_Name (Node : Named_Stmt_Decl'Class) return Defining_Name
type Not_Null

Qualifier for the not null keywords.

function P_As_Bool (Node : Not_Null'Class) return Boolean

Return whether this is an instance of NotNullPresent

type Not_Null_Absent
type Not_Null_Present
type Null_Component_Decl

Placeholder for the null in lists of components.

type Null_Literal

The null literal.

type Null_Record_Aggregate

Aggregate for null record.

type Null_Record_Def

Record definition for null record.

type Null_Stmt

null; statement.

type Null_Subp_Decl

Declaration for a null subprogram.

type Number_Decl

Declaration for a static constant number.

function F_Ids (Node : Number_Decl'Class) return Defining_Name_List
function F_Expr (Node : Number_Decl'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Op

Operation in a binary expression.

Note that the ARM does not consider “double_dot” (”..”) as a binary operator, but we process it this way here anyway to keep things simple.

type Op_Abs
type Op_And
type Op_And_Then
type Op_Concat
type Op_Div
type Op_Double_Dot
type Op_Eq
type Op_Gt
type Op_Gte
type Op_In
type Op_Lt
type Op_Lte
type Op_Minus
type Op_Mod
type Op_Mult
type Op_Neq
type Op_Not
type Op_Not_In
type Op_Or
type Op_Or_Else
type Op_Plus
type Op_Pow
type Op_Rem
type Op_Xor
type Ordinary_Fixed_Point_Def

Type definition for ordinary fixed-point numbers.

function F_Delta (Node : Ordinary_Fixed_Point_Def'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Range (Node : Ordinary_Fixed_Point_Def'Class) return Range_Spec
type Others_Designator

other designator.

type Overriding_Node

Syntactic indicators for subprogram overriding modes.

type Overriding_Not_Overriding
type Overriding_Overriding
type Overriding_Unspecified
type Package_Body

Package body.

function F_Package_Name (Node : Package_Body'Class) return Defining_Name
function F_Decls (Node : Package_Body'Class) return Declarative_Part
function F_Stmts (Node : Package_Body'Class) return Handled_Stmts
function F_End_Name (Node : Package_Body'Class) return End_Name
type Package_Body_Stub

Stub for a package body (is separate).

function F_Name (Node : Package_Body_Stub'Class) return Defining_Name
type Package_Decl

Non-generic package declarations.

type Package_Renaming_Decl

Declaration for a package renaming.

function F_Name (Node : Package_Renaming_Decl'Class) return Defining_Name
function F_Renames (Node : Package_Renaming_Decl'Class) return Renaming_Clause
function P_Renamed_Package (Node : Package_Renaming_Decl'Class) return Basic_Decl

Return the declaration of the package that is renamed by Self.

function P_Final_Renamed_Package (Node : Package_Renaming_Decl'Class) return Basic_Decl

Return the declaration of the package that is ultimately renamed by Self, skipping through all intermediate package renamings.

type Param_Assoc

Assocation (X => Y) used for aggregates and parameter associations.

function F_Designator (Node : Param_Assoc'Class) return Ada_Node

This field can contain one of the following nodes:

  • Identifier
  • Others_Designator
  • String_Literal
function F_R_Expr (Node : Param_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Param_Spec

Specification for a parameter.

function F_Ids (Node : Param_Spec'Class) return Defining_Name_List
function F_Has_Aliased (Node : Param_Spec'Class) return Aliased_Node
function F_Has_Aliased (Node : Param_Spec'Class) return Boolean
function F_Mode (Node : Param_Spec'Class) return Mode
function F_Mode (Node : Param_Spec'Class) return Ada_Mode
function F_Type_Expr (Node : Param_Spec'Class) return Type_Expr

This field can contain one of the following nodes:

  • Anonymous_Type
  • Subtype_Indication
function F_Default_Expr (Node : Param_Spec'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Param_Spec_List

List of ParamSpec.

function List_Child (Node : Param_Spec_List'Class; Index : Positive) return Param_Spec

Return the Index‘th child of Node, or null if Node has no such child.

function Param_Spec_List_First (Node : Param_Spec_List) return Positive

Implementation detail for the Iterable aspect

function Param_Spec_List_Next (Node : Param_Spec_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Param_Spec_List_Has_Element (Node : Param_Spec_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Param_Spec_List_Element (Node : Param_Spec_List; Cursor : Positive) return Param_Spec'Class

Implementation detail for the Iterable aspect

type Params

List of parameter specifications.

function F_Params (Node : Params'Class) return Param_Spec_List
type Paren_Expr

Parenthesized expression.

function F_Expr (Node : Paren_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Parent_List

List of parents in a type declaration.

This list node can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Pragma_Argument_Assoc

Argument assocation in a pragma.

function F_Id (Node : Pragma_Argument_Assoc'Class) return Identifier
function F_Expr (Node : Pragma_Argument_Assoc'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Pragma_Node

Class for pragmas (RM 2.8). Pragmas are compiler directives, that can be language or compiler defined.

function F_Id (Node : Pragma_Node'Class) return Identifier
function F_Args (Node : Pragma_Node'Class) return Base_Assoc_List
function P_Associated_Decls (Node : Pragma_Node'Class) return Basic_Decl_Array

Return an array of BasicDecl instances associated with this pragma, or an empty array if non applicable.

type Pragma_Node_List

List of Pragma.

function List_Child (Node : Pragma_Node_List'Class; Index : Positive) return Pragma_Node

Return the Index‘th child of Node, or null if Node has no such child.

function Pragma_Node_List_First (Node : Pragma_Node_List) return Positive

Implementation detail for the Iterable aspect

function Pragma_Node_List_Next (Node : Pragma_Node_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Pragma_Node_List_Has_Element (Node : Pragma_Node_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Pragma_Node_List_Element (Node : Pragma_Node_List; Cursor : Positive) return Pragma_Node'Class

Implementation detail for the Iterable aspect

type Prim_Type_Accessor

Synthetic node wrapping around a primitive type entity. Used in metadata.

type Private_Node

Qualifier for the private keyword.

function P_As_Bool (Node : Private_Node'Class) return Boolean

Return whether this is an instance of PrivatePresent

type Private_Absent
type Private_Part

List of declarations in a private part.

type Private_Present
type Private_Type_Def

Type definition for a private type.

function F_Has_Abstract (Node : Private_Type_Def'Class) return Abstract_Node
function F_Has_Abstract (Node : Private_Type_Def'Class) return Boolean
function F_Has_Tagged (Node : Private_Type_Def'Class) return Tagged_Node
function F_Has_Tagged (Node : Private_Type_Def'Class) return Boolean
function F_Has_Limited (Node : Private_Type_Def'Class) return Limited_Node
function F_Has_Limited (Node : Private_Type_Def'Class) return Boolean
type Protected_Node

Qualifier for the protected keyword.

function P_As_Bool (Node : Protected_Node'Class) return Boolean

Return whether this is an instance of ProtectedPresent

type Protected_Absent
type Protected_Body

Protected object body.

function F_Name (Node : Protected_Body'Class) return Defining_Name
function F_Decls (Node : Protected_Body'Class) return Declarative_Part
function F_End_Name (Node : Protected_Body'Class) return End_Name
type Protected_Body_Stub

Stub for a protected object body (is separate).

function F_Name (Node : Protected_Body_Stub'Class) return Defining_Name
type Protected_Def

Type definition for a protected object.

function F_Public_Part (Node : Protected_Def'Class) return Public_Part
function F_Private_Part (Node : Protected_Def'Class) return Private_Part
function F_End_Name (Node : Protected_Def'Class) return End_Name
type Protected_Present
type Protected_Type_Decl

Declaration for a protected type.

function F_Discriminants (Node : Protected_Type_Decl'Class) return Discriminant_Part
function F_Interfaces (Node : Protected_Type_Decl'Class) return Parent_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Definition (Node : Protected_Type_Decl'Class) return Protected_Def
type Public_Part

List of declarations in a public part.

type Qual_Expr

Qualified expression (...'(...)).

function F_Prefix (Node : Qual_Expr'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Suffix (Node : Qual_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Base_Aggregate
  • Paren_Expr
type Quantified_Expr

Quantified expression.

function F_Quantifier (Node : Quantified_Expr'Class) return Quantifier
function F_Quantifier (Node : Quantified_Expr'Class) return Ada_Quantifier
function F_Loop_Spec (Node : Quantified_Expr'Class) return For_Loop_Spec
function F_Expr (Node : Quantified_Expr'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Quantifier

Type for quantified expressions.

type Quantifier_All
type Quantifier_Some
type Raise_Expr

Expression to raise an exception.

function F_Exception_Name (Node : Raise_Expr'Class) return Name
function F_Error_Message (Node : Raise_Expr'Class) return Expr
type Raise_Stmt

raise statement.

function F_Exception_Name (Node : Raise_Stmt'Class) return Name
function F_Error_Message (Node : Raise_Stmt'Class) return Expr
type Range_Constraint

Range-based type constraint.

function F_Range (Node : Range_Constraint'Class) return Range_Spec
type Range_Spec

Range specification.

function F_Range (Node : Range_Spec'Class) return Expr

This field can contain one of the following nodes:

  • Attribute_Ref
  • Bin_Op
  • Box_Expr
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type Real_Literal

Literal for a real number.

type Record_Def

Record definition that contains components (record ... end record).

type Record_Rep_Clause

Representation clause for a record type.

function F_Name (Node : Record_Rep_Clause'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_At_Expr (Node : Record_Rep_Clause'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Components (Node : Record_Rep_Clause'Class) return Ada_Node_List

This field contains a list that itself contains one of the following nodes:

  • Component_Clause
  • Pragma_Node
type Record_Type_Def

Type definition for a record.

function F_Has_Abstract (Node : Record_Type_Def'Class) return Abstract_Node
function F_Has_Abstract (Node : Record_Type_Def'Class) return Boolean
function F_Has_Tagged (Node : Record_Type_Def'Class) return Tagged_Node
function F_Has_Tagged (Node : Record_Type_Def'Class) return Boolean
function F_Has_Limited (Node : Record_Type_Def'Class) return Limited_Node
function F_Has_Limited (Node : Record_Type_Def'Class) return Boolean
function F_Record_Def (Node : Record_Type_Def'Class) return Base_Record_Def
type Relation_Op

Binary operation that compares two value, producing a boolean.

type Renaming_Clause

Renaming clause, used everywhere renamings are valid.

function F_Renamed_Object (Node : Renaming_Clause'Class) return Name
type Requeue_Stmt

requeue statement.

function F_Call_Name (Node : Requeue_Stmt'Class) return Name

This field can contain one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
function F_Has_Abort (Node : Requeue_Stmt'Class) return Abort_Node
function F_Has_Abort (Node : Requeue_Stmt'Class) return Boolean
type Return_Stmt

return statement.

function F_Return_Expr (Node : Return_Stmt'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Reverse_Node

Qualifier for the reverse keyword.

function P_As_Bool (Node : Reverse_Node'Class) return Boolean

Return whether this is an instance of ReversePresent

type Reverse_Absent
type Reverse_Present
type Select_Stmt

select statements block.

function F_Guards (Node : Select_Stmt'Class) return Select_When_Part_List
function F_Else_Stmts (Node : Select_Stmt'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
function F_Abort_Stmts (Node : Select_Stmt'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Select_When_Part

Alternative part in a select statements block.

function F_Cond_Expr (Node : Select_When_Part'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Stmts (Node : Select_When_Part'Class) return Stmt_List

This field contains a list that itself contains one of the following nodes:

  • Pragma_Node
  • Stmt
type Select_When_Part_List

List of SelectWhenPart.

function List_Child (Node : Select_When_Part_List'Class; Index : Positive) return Select_When_Part

Return the Index‘th child of Node, or null if Node has no such child.

function Select_When_Part_List_First (Node : Select_When_Part_List) return Positive

Implementation detail for the Iterable aspect

function Select_When_Part_List_Next (Node : Select_When_Part_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Select_When_Part_List_Has_Element (Node : Select_When_Part_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Select_When_Part_List_Element (Node : Select_When_Part_List; Cursor : Positive) return Select_When_Part'Class

Implementation detail for the Iterable aspect

type Signed_Int_Type_Def

Type definition for a signed integer type.

function F_Range (Node : Signed_Int_Type_Def'Class) return Range_Spec
type Single_Protected_Decl

Declaration for a single protected object.

function F_Name (Node : Single_Protected_Decl'Class) return Defining_Name
function F_Interfaces (Node : Single_Protected_Decl'Class) return Parent_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Definition (Node : Single_Protected_Decl'Class) return Protected_Def
type Single_Task_Decl

Declaration for a single task.

function F_Task_Type (Node : Single_Task_Decl'Class) return Single_Task_Type_Decl
type Task_Type_Decl

Declaration for a task type.

function F_Discriminants (Node : Task_Type_Decl'Class) return Discriminant_Part
function F_Definition (Node : Task_Type_Decl'Class) return Task_Def
type Single_Task_Type_Decl

Type declaration for a single task.

type Stmt_List

List of statements.

This list node can contain one of the following nodes:

  • Pragma_Node
  • Stmt
type String_Literal

String literal.

function P_Denoted_Value (Node : String_Literal'Class) return Text_Type

Return the value that this literal denotes.

type Subp_Body

Subprogram body.

function F_Decls (Node : Subp_Body'Class) return Declarative_Part
function F_Stmts (Node : Subp_Body'Class) return Handled_Stmts
function F_End_Name (Node : Subp_Body'Class) return End_Name
type Subp_Body_Stub

Stub for a subprogram body (is separate).

function F_Overriding (Node : Subp_Body_Stub'Class) return Overriding_Node
function F_Overriding (Node : Subp_Body_Stub'Class) return Ada_Overriding_Node
function F_Subp_Spec (Node : Subp_Body_Stub'Class) return Subp_Spec
type Subp_Decl

Regular subprogram declaration.

type Subp_Kind

Qualifier for a subprogram kind.

type Subp_Kind_Function
type Subp_Kind_Procedure
type Subp_Renaming_Decl

Declaration for a subprogram renaming.

function F_Renames (Node : Subp_Renaming_Decl'Class) return Renaming_Clause
type Subp_Spec

Subprogram specification.

function F_Subp_Kind (Node : Subp_Spec'Class) return Subp_Kind
function F_Subp_Kind (Node : Subp_Spec'Class) return Ada_Subp_Kind
function F_Subp_Name (Node : Subp_Spec'Class) return Defining_Name
function F_Subp_Params (Node : Subp_Spec'Class) return Params
function F_Subp_Returns (Node : Subp_Spec'Class) return Type_Expr

This field can contain one of the following nodes:

  • Anonymous_Type
  • Subtype_Indication
type Subtype_Decl

Subtype declaration.

function F_Subtype (Node : Subtype_Decl'Class) return Subtype_Indication
type Subunit

Subunit (separate).

function F_Name (Node : Subunit'Class) return Name

This field can contain one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Body (Node : Subunit'Class) return Body_Node

This field can contain one of the following nodes:

  • Package_Body
  • Protected_Body
  • Subp_Body
  • Task_Body
function P_Body_Root (Node : Subunit'Class) return Basic_Decl

Return the body in which this subunit is rooted.

type Synchronized_Node

Qualifier for the synchronized keyword.

function P_As_Bool (Node : Synchronized_Node'Class) return Boolean

Return whether this is an instance of SynchronizedPresent

type Synchronized_Absent
type Synchronized_Present
type Synth_Anonymous_Type_Decl

Synthetic anonymous type decl. Used to generate anonymous access types.

type Synthetic_Renaming_Clause

Synthetic renaming clause. Used to synthesize object decls with renamings. (See to_anonymous_object_decl).

type Tagged_Node

Qualifier for the tagged keyword.

function P_As_Bool (Node : Tagged_Node'Class) return Boolean

Return whether this is an instance of TaggedPresent

type Tagged_Absent
type Tagged_Present
type Target_Name

Name for Ada 2020 @.

type Task_Body

Task body.

function F_Name (Node : Task_Body'Class) return Defining_Name
function F_Decls (Node : Task_Body'Class) return Declarative_Part
function F_Stmts (Node : Task_Body'Class) return Handled_Stmts
function F_End_Name (Node : Task_Body'Class) return End_Name
type Task_Body_Stub

Stub for a task body (is separate).

function F_Name (Node : Task_Body_Stub'Class) return Defining_Name
type Task_Def

Type definition for a task type.

function F_Interfaces (Node : Task_Def'Class) return Parent_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
function F_Public_Part (Node : Task_Def'Class) return Public_Part
function F_Private_Part (Node : Task_Def'Class) return Private_Part
function F_End_Name (Node : Task_Def'Class) return End_Name
type Terminate_Alternative

terminate alternative in a select statement.

type Type_Access_Def

Syntactic type definition for accesses.

function F_Has_All (Node : Type_Access_Def'Class) return All_Node
function F_Has_All (Node : Type_Access_Def'Class) return Boolean
function F_Has_Constant (Node : Type_Access_Def'Class) return Constant_Node
function F_Has_Constant (Node : Type_Access_Def'Class) return Boolean
function F_Subtype_Indication (Node : Type_Access_Def'Class) return Subtype_Indication
type Un_Op

Unary expression.

function F_Op (Node : Un_Op'Class) return Op

This field can contain one of the following nodes:

  • Op_Abs
  • Op_Minus
  • Op_Not
  • Op_Plus
function F_Op (Node : Un_Op'Class) return Ada_Op
function F_Expr (Node : Un_Op'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type Unconstrained_Array_Index

List of unconstrained array indexes.

function F_Subtype_Indication (Node : Unconstrained_Array_Index'Class) return Subtype_Indication
type Unconstrained_Array_Index_List

List of UnconstrainedArrayIndex.

function List_Child (Node : Unconstrained_Array_Index_List'Class; Index : Positive) return Unconstrained_Array_Index

Return the Index‘th child of Node, or null if Node has no such child.

function Unconstrained_Array_Index_List_First (Node : Unconstrained_Array_Index_List) return Positive

Implementation detail for the Iterable aspect

function Unconstrained_Array_Index_List_Next (Node : Unconstrained_Array_Index_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Unconstrained_Array_Index_List_Has_Element (Node : Unconstrained_Array_Index_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Unconstrained_Array_Index_List_Element (Node : Unconstrained_Array_Index_List; Cursor : Positive) return Unconstrained_Array_Index'Class

Implementation detail for the Iterable aspect

type Unconstrained_Array_Indices

Unconstrained specification for array indexes.

function F_Types (Node : Unconstrained_Array_Indices'Class) return Unconstrained_Array_Index_List
type Unknown_Discriminant_Part

Unknown list of discriminants in type declarations.

type Until_Node

Qualifier for the until keyword.

function P_As_Bool (Node : Until_Node'Class) return Boolean

Return whether this is an instance of UntilPresent

type Until_Absent
type Until_Present
type Update_Attribute_Ref

Reference to the Update attribute.

type Use_Clause

Base class for use clauses.

type Use_Package_Clause

Use clause for packages.

function F_Packages (Node : Use_Package_Clause'Class) return Name_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type Use_Type_Clause

Use clause for types.

function F_Has_All (Node : Use_Type_Clause'Class) return All_Node
function F_Has_All (Node : Use_Type_Clause'Class) return Boolean
function F_Types (Node : Use_Type_Clause'Class) return Name_List

This field contains a list that itself contains one of the following nodes:

  • Attribute_Ref
  • Call_Expr
  • Char_Literal
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • Qual_Expr
  • String_Literal
  • Target_Name
type Variant

Single variant in a discriminated type record declaration.

This corresponds to a when ... => ... section in a variant part.

function F_Choices (Node : Variant'Class) return Alternatives_List

This field contains a list that itself contains one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Discrete_Subtype_Indication
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Others_Designator
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
function F_Components (Node : Variant'Class) return Component_List
type Variant_List

List of Variant.

function List_Child (Node : Variant_List'Class; Index : Positive) return Variant

Return the Index‘th child of Node, or null if Node has no such child.

function Variant_List_First (Node : Variant_List) return Positive

Implementation detail for the Iterable aspect

function Variant_List_Next (Node : Variant_List; Cursor : Positive) return Positive

Implementation detail for the Iterable aspect

function Variant_List_Has_Element (Node : Variant_List; Cursor : Positive) return Boolean

Implementation detail for the Iterable aspect

function Variant_List_Element (Node : Variant_List; Cursor : Positive) return Variant'Class

Implementation detail for the Iterable aspect

type Variant_Part

Variant part in a discriminated type record declaration.

This corresponds to the whole case ... is ... end case; block.

function F_Discr_Name (Node : Variant_Part'Class) return Identifier
function F_Variant (Node : Variant_Part'Class) return Variant_List
type While_Loop_Spec

Specification for a while loop.

function F_Expr (Node : While_Loop_Spec'Class) return Expr

This field can contain one of the following nodes:

  • Allocator
  • Attribute_Ref
  • Base_Aggregate
  • Bin_Op
  • Call_Expr
  • Case_Expr
  • Char_Literal
  • Decl_Expr
  • Dotted_Name
  • Explicit_Deref
  • Identifier
  • If_Expr
  • Membership_Expr
  • Null_Literal
  • Num_Literal
  • Paren_Expr
  • Qual_Expr
  • Quantified_Expr
  • Raise_Expr
  • String_Literal
  • Target_Name
  • Un_Op
type While_Loop_Stmt

Statement for while loops (while ... loop ... end loop;).

type With_Clause

With clause.

function F_Has_Limited (Node : With_Clause'Class) return Limited_Node
function F_Has_Limited (Node : With_Clause'Class) return Boolean
function F_Has_Private (Node : With_Clause'Class) return Private_Node
function F_Has_Private (Node : With_Clause'Class) return Boolean
function F_Packages (Node : With_Clause'Class) return Name_List

This field contains a list that itself contains one of the following nodes:

  • Char_Literal
  • Dotted_Name
  • Identifier
  • String_Literal
type With_Private

Qualifier for the private keyword in with private record clauses.

function P_As_Bool (Node : With_Private'Class) return Boolean

Return whether this is an instance of WithPrivatePresent

type With_Private_Absent
type With_Private_Present
type Unit_Provider_Interface

Interface to fetch analysis units from a name and a unit kind.

The unit provider mechanism provides an abstraction which assumes that to any couple (unit name, unit kind) we can associate at most one source file. This means that several couples can be associated to the same source file, but on the other hand, only one one source file can be associated to a couple.

This is used to make the semantic analysis able to switch from one analysis units to another.

function Get_Unit_Filename (Provider : Unit_Provider_Interface; Name : Text_Type; Kind : Analysis_Unit_Kind) return String is abstract

Return the filename corresponding to the given unit name/unit kind. Raise a Property_Error if the given unit name is not valid.

function Get_Unit (Provider : Unit_Provider_Interface; Context : Analysis_Context'Class; Name : Text_Type; Kind : Analysis_Unit_Kind; Charset : String; Reparse : Boolean) return Analysis_Unit'Class is abstract

Fetch and return the analysis unit referenced by the given unit name. Raise a Property_Error if the given unit name is not valid.

procedure Release (Provider : Unit_Provider_Interface) is abstract

Actions to perform when releasing resources associated to Provider

procedure Do_Release (Provider : Unit_Provider_Interface'Class)

Helper for the instantiation below

function Create_Unit_Provider_Reference (Provider : Unit_Provider_Interface'Class) return Unit_Provider_Reference

Simple wrapper around the GNATCOLL.Refcount API to create unit provider references.

package Unit_Provider_References is new GNATCOLL.Refcount.Shared_Pointers (Unit_Provider_Interface'Class, Do_Release)
type Unit_Provider_Reference
No_Unit_Provider_Reference : Unit_Provider_Reference renames Unit_Provider_References.Null_Ref
procedure Disable_Lookup_Cache (Disable : Boolean)

Debug helper: if Disable is true, disable the use of caches in lexical environment lookups. Otherwise, activate it.

procedure Trigger_Envs_Debug (Is_Active : Boolean)

Debug helper: activate debug traces for lexical envs lookups

type Child_Record

Variant that holds either an AST node or a token

type Children_Array
type Aspect

Composite field representing the aspect of an entity (RM 13).

function Exists (Self : Aspect) return Boolean

Whether the aspect is defined or not

function Node (Self : Aspect) return Ada_Node'Class

Syntactic node that defines the aspect

function Value (Self : Aspect) return Expr'Class

Expr node defining the value of the aspect

type Completion_Item
function Decl (Self : Completion_Item) return Basic_Decl'Class
function Is_Dot_Call (Self : Completion_Item) return Boolean
function Is_Visible (Self : Completion_Item) return Boolean
type Completion_Item_Array
type Discrete_Range

Represent the range of a discrete type or subtype. The bounds are not evaluated, you need to call eval_as_int on them, if they’re static, to get their value.

function Low_Bound (Self : Discrete_Range) return Expr'Class
function High_Bound (Self : Discrete_Range) return Expr'Class
type Discriminant_Values

Represent a set of values (as a list of choices) on a discriminant.

function Discriminant (Self : Discriminant_Values) return Identifier'Class
function Values (Self : Discriminant_Values) return Alternatives_List'Class
type Discriminant_Values_Array
type Doc_Annotation

Documentation annotation.

function Key (Self : Doc_Annotation) return Text_Type

Annotation key

function Value (Self : Doc_Annotation) return Text_Type

Annotation value

function Create_Doc_Annotation (Key : Text_Type; Value : Text_Type) return Doc_Annotation
type Doc_Annotation_Array
type Ada_Node_Array
type Base_Formal_Param_Decl_Array
function Create_Shape (Components : Base_Formal_Param_Decl_Array; Discriminants_Values : Discriminant_Values_Array) return Shape
type Base_Type_Decl_Array
type Basic_Decl_Array
type Compilation_Unit_Array
type Defining_Name_Array
type Generic_Instantiation_Array
type Param_Spec_Array
type Type_Decl_Array
type Param_Actual

Data structure used by zip_with_params property. Associates an expression (the actual) to a formal param declaration (the parameter).

function Param (Self : Param_Actual) return Defining_Name'Class
function Actual (Self : Param_Actual) return Expr'Class
type Param_Actual_Array
type Ref_Result

Result for a cross reference query returning a reference.

function Ref (Self : Ref_Result) return Base_Id'Class
function Kind (Self : Ref_Result) return Ref_Result_Kind
type Ref_Result_Array
type Refd_Decl

Result for a cross reference query returning a referenced decl.

function Decl (Self : Refd_Decl) return Basic_Decl'Class
function Kind (Self : Refd_Decl) return Ref_Result_Kind
type Refd_Def

Result for a cross reference query returning a referenced defining name.

function Def_Name (Self : Refd_Def) return Defining_Name'Class
function Kind (Self : Refd_Def) return Ref_Result_Kind
type Shape

Represent one of the shapes that a variant record can have, as a list of the available components.

function Components (Self : Shape) return Base_Formal_Param_Decl_Array
function Discriminants_Values (Self : Shape) return Discriminant_Values_Array
type Shape_Array
type Substitution

Represent a substitution of a BasicDecl by a given value. This can then be used as part of an environment in the eval_as_*_in_env property. See the declaration of those properties for more details.

function From_Decl (Self : Substitution) return Basic_Decl'Class

The declaration to substitute.

function To_Value (Self : Substitution) return Big_Integer

The value by which to substitute the declaration.

function Value_Type (Self : Substitution) return Base_Type_Decl'Class

The type of the substituted value.

type Substitution_Array
type Analysis_Unit_Array
type Unbounded_Text_Type_Array
type Token_Iterator

Allow iteration on a range of tokens corresponding to a node

function First_Token (Self : Token_Iterator) return Token_Reference

Return the first token corresponding to the node

function Next_Token (Self : Token_Iterator; Tok : Token_Reference) return Token_Reference

Return the token that follows Tok in the token stream

function Has_Element (Self : Token_Iterator; Tok : Token_Reference) return Boolean

Return if Tok is in Self’s iteration range

function Element (Self : Token_Iterator; Tok : Token_Reference) return Token_Reference

Identity function: helper for the Iterable aspect

function Is_Keyword (Token : Token_Reference; Version : Language_Version) return Boolean

Given an Ada language version, return whether Token is an Ada keyword.

Due to the way Libadalang works, every token added after Ada 83 is lexed as a regular identifier, and then treated specially by the parser in some circumstances (being akin to the notion of reserved word).

This function returns True for regular lexer keywords, as well as for those identifiers.