- NODE PROPERTIES:
â–¸ AstParentFullName (String); Cardinality one
(mandatory with default value <empty>
); This field holds the FULL_NAME of the AST parent of an entity.
â–¸ AstParentType (String); Cardinality one
(mandatory with default value <empty>
); The type of the AST parent. Since this is only used in some parts of the graph, the list does not include all possible parents by intention. Possible parents: METHOD, TYPE_DECL, NAMESPACE_BLOCK.
â–¸ Code (String); Cardinality one
(mandatory with default value <empty>
); This field holds the code snippet that the node represents.
â–¸ ColumnNumber (Int); Cardinality ZeroOrOne
(optional); This optional fields provides the column number of the program construct represented by the node.
â–¸ ColumnNumberEnd (Int); Cardinality ZeroOrOne
(optional); This optional fields provides the column number at which the program construct represented by the node ends.
â–¸ Filename (String); Cardinality one
(mandatory with default value <empty>
); The path of the source file this node was generated from, relative to the root path in the meta data node. This field must be set but may be set to the value <unknown>
to indicate that no source file can be associated with the node, e.g., because the node represents an entity known to exist because it is referenced, but for which the file that is is declared in is unknown.
â–¸ FullName (String); Cardinality one
(mandatory with default value <empty>
); This is the fully-qualified name of an entity, e.g., the fully-qualified name of a method or type. The details of what constitutes a fully-qualified name are language specific. This field SHOULD be human readable.
â–¸ GenericSignature (String); Cardinality one
(mandatory with default value <empty>
); This field is experimental. It will likely be removed in the future without any notice. It stores type information for generic types and methods as well as type information for members and locals where the type either contains a type parameter reference or an instantiated type reference.
â–¸ Hash (String); Cardinality ZeroOrOne
(optional); This property contains a hash value in the form of a string. Hashes can be used to summarize data, e.g., to summarize the contents of source files or sub graphs. Such summaries are useful to determine whether code has already been analyzed in incremental analysis pipelines. This property is optional to allow its calculation to be deferred or skipped if the hash is not needed.
â–¸ IsExternal (Boolean); Cardinality one
(mandatory with default value false
); Indicates that the construct (METHOD or TYPE_DECL) is external, that is, it is referenced but not defined in the code (applies both to insular parsing and to library functions where we have header files only)
â–¸ LineNumber (Int); Cardinality ZeroOrOne
(optional); This optional field provides the line number of the program construct represented by the node.
â–¸ LineNumberEnd (Int); Cardinality ZeroOrOne
(optional); This optional fields provides the line number at which the program construct represented by the node ends.
â–¸ Name (String); Cardinality one
(mandatory with default value <empty>
); Name of represented object, e.g., method name (e.g. "run")
â–¸ Offset (Int); Cardinality ZeroOrOne
(optional); Start offset into the CONTENT property of the corresponding FILE node. The offset is such that parts of the content can easily be accessed via content.substring(offset, offsetEnd)
. This means that the offset must be measured in utf16 encoding (i.e. neither in characters/codeunits nor in byte-offsets into a utf8 encoding). E.g. for METHOD nodes this start offset points to the start of the methods source code in the string holding the source code of the entire file.
â–¸ OffsetEnd (Int); Cardinality ZeroOrOne
(optional); End offset (exclusive) into the CONTENT property of the corresponding FILE node. See OFFSET documentation for finer details. E.g. for METHOD nodes this end offset points to the first code position which is not part of the method.
â–¸ Order (Int); Cardinality one
(mandatory with default value -1
); This integer indicates the position of the node among its siblings in the AST. The left-most child has an order of 0.
â–¸ Signature (String); Cardinality one
(mandatory with default value ``); The method signature encodes the types of parameters in a string. The string SHOULD be human readable and suitable for differentiating methods with different parameter types sufficiently to allow for resolving of function overloading. The present specification does not enforce a strict format for the signature, that is, it can be chosen by the frontend implementor to fit the source language.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Declarationtrait CfgNodetrait AstNodetrait MethodBasetrait DeclarationBasetrait CfgNodeBasetrait AstNodeBaseclass StoredNodetrait AbstractNodetrait Producttrait Equalstrait StaticType[MethodEMT]class GNodetrait DNodeOrNodeclass Objecttrait Matchableclass Any