Expression

abstract class Expression : Statement, HasType

Represents one expression. It is used as a base class for multiple different types of expressions. The only constraint is, that each expression has a type.

Note: In our graph, Expression is inherited from Statement. This is a constraint of the C++ language. In C++, it is valid to have an expression (for example a ) as part of a function body, even though the expression value is not used. Consider the following code: int main() { 1; }

This is not possible in Java, the aforementioned code example would prompt a compile error.

Functions

Link copied to clipboard
open fun accept(strategy: IStrategy<V>, visitor: IVisitor<V>)
Link copied to clipboard
fun addAllPrevDFG(prev: Collection<out Node>)
Link copied to clipboard
Link copied to clipboard
open fun addDeclaration(declaration: Declaration)
Adds the specified declaration to this declaration holder.
Link copied to clipboard
open fun <T : Declaration?> addIfNotContains(collection: Collection<T>, declaration: T)
Link copied to clipboard
fun addNextDFG(next: Node)
Link copied to clipboard
fun addNextEOG(propertyEdge: PropertyEdge<Node>)
Link copied to clipboard
fun addPrevDFG(prev: Node)
Link copied to clipboard
fun addPrevEOG(propertyEdge: PropertyEdge<Node>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
If a node should be removed from the graph, just removing it from the AST is not enough (see issue #60).
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
Virtual property to return a list of the node's children.
Link copied to clipboard
Link copied to clipboard
Virtual property to access localEdges without property edges.
Link copied to clipboard
Virtual property for accessing nextEOGEdges without property edges.
Link copied to clipboard
Virtual property for accessing prevEOGEdges without property edges.
Link copied to clipboard
Link copied to clipboard
open fun getType(): Type
Link copied to clipboard
open fun hashCode(): Int
Implementation of hash code.
Link copied to clipboard
open fun refreshType()
Link copied to clipboard
Link copied to clipboard
fun removeNextDFG(next: Node)
Link copied to clipboard
fun removePrevDFG(prev: Node)
Link copied to clipboard
Link copied to clipboard
open fun resetTypes(type: Type)
Used to set the type and clear the possible subtypes list for when a type is more precise than the current.
Link copied to clipboard
Virtual property to access localEdges without property edges.
Link copied to clipboard
fun setNextEOG(value: List<out Node>)
Virtual property for accessing nextEOGEdges without property edges.
Link copied to clipboard
open fun setPossibleSubTypes(possibleSubTypes: List<Type>)
Link copied to clipboard
fun setPrevEOG(value: List<out Node>)
Virtual property for accessing prevEOGEdges without property edges.
Link copied to clipboard
open fun setType(type: Type)

open fun setType(type: Type, root: List<HasType>)
Set the node's type.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
Link copied to clipboard
open fun updatePossibleSubtypes(types: List<Type>)
Link copied to clipboard
open fun updateType(type: Type)
Sideeffect free type modification WARNING: This should only be used by the TypeSystem Pass

Properties

Link copied to clipboard
List of annotations associated with that node.
Link copied to clipboard
open var argumentIndex: Int
Index of the argument if this node is used in a function call or parameter list.
Link copied to clipboard
open var code: String
Original code snippet of this node.
Link copied to clipboard
open var comment: String
Optional comment of this node.
Link copied to clipboard
Link copied to clipboard
val EMPTY_NAME: String = ""
Link copied to clipboard
open var file: String
Name of the containing file.
Link copied to clipboard
open var id: Long
Required field for object graph mapping.
Link copied to clipboard
Specifies, whether this node is implicit, i.e.
Link copied to clipboard
If a node is marked as being inferred, it means that it was created artificially and does not necessarily have a real counterpart in the scanned source code.
Link copied to clipboard
The language of this node.
Link copied to clipboard
A list of local variables associated to this statement, defined by their [ ] extracted from Block because for, while, if, switch can declare locals in their condition or initializers.
Link copied to clipboard
Location of the finding in source code.
Link copied to clipboard
open var name: Name
This property holds the full name using our new Name class.
Link copied to clipboard
open var nextDFG: Set<Node>
Link copied to clipboard
outgoing control flow edges.
Link copied to clipboard
Link copied to clipboard
open var prevDFG: Set<Node>
Link copied to clipboard
Incoming control flow edges.
Link copied to clipboard
open var scope: Scope
The scope this node "lives" in / in which it is defined.
Link copied to clipboard
open var TO_STRING_STYLE: ToStringStyle
Link copied to clipboard
Link copied to clipboard

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
inline fun <T> Node?.allChildren(noinline predicate: (T) -> Boolean? = null): List<T>

Flattens the AST beginning with this node and returns all nodes of type T. For convenience, an optional predicate function predicate can be supplied, which will be applied via Collection.filter

Link copied to clipboard
fun Node.applyMetadata(provider: MetadataProvider?, name: CharSequence? = EMPTY_NAME, rawNode: Any? = null, codeOverride: String? = null, localNameOnly: Boolean = false, defaultNamespace: Name? = null)

Applies various metadata on this Node, based on the kind of provider in provider. This can include:

Link copied to clipboard
@JvmName(name = "astNodes")
fun Node.ast(): List<Node>
inline fun <T : Node> Node.ast(): List<T>
Link copied to clipboard
Link copied to clipboard
inline fun <T : Declaration> DeclarationHolder.byName(name: String, fqn: Boolean = false): T
Link copied to clipboard
inline fun <T : Declaration> DeclarationHolder.byNameOrNull(name: String, fqn: Boolean = false): T?
Link copied to clipboard

Returns all CallExpression children in this graph, starting with this Node.

Link copied to clipboard

All nodes which depend on this if statement

Link copied to clipboard
inline fun <T : Node> Node.dfgFrom(): List<T>
Link copied to clipboard

Returns all FieldDeclaration children in this graph, starting with this Node.

Link copied to clipboard

Returns an instance of FulfilledAndFailedPaths where FulfilledAndFailedPaths.fulfilled contains all possible shortest data flow paths between the starting node this and the end node fulfilling predicate. The paths are represented as lists of nodes. Paths which do not end at such a node are included in FulfilledAndFailedPaths.failed.

Link copied to clipboard
fun Node.followNextEOG(predicate: (PropertyEdge<*>) -> Boolean): List<PropertyEdge<*>>?

Returns a list of edges which are from the evaluation order between the starting node this and an edge fulfilling predicate. If the return value is not null, a path from this to such an edge is possible but not mandatory.

Link copied to clipboard

Returns an instance of FulfilledAndFailedPaths where FulfilledAndFailedPaths.fulfilled contains all possible shortest evaluation paths between the starting node this and the end node fulfilling predicate. The paths are represented as lists of nodes. Paths which do not end at such a node are included in FulfilledAndFailedPaths.failed.

Link copied to clipboard
fun Node.followPrevDFG(predicate: (Node) -> Boolean): MutableList<Node>?

Returns a list of nodes which are a data flow path between the starting node this and the end node fulfilling predicate. If the return value is not null, a data flow from this to such a node is possible but not mandatory.

Link copied to clipboard

Returns an instance of FulfilledAndFailedPaths where FulfilledAndFailedPaths.fulfilled contains all possible shortest data flow paths between the end node this and the starting node fulfilling predicate. The paths are represented as lists of nodes. Paths which do not end at such a node are included in FulfilledAndFailedPaths.failed.

Link copied to clipboard
fun Node.followPrevEOG(predicate: (PropertyEdge<*>) -> Boolean): List<PropertyEdge<*>>?

Returns a list of edges which are from the evaluation order between the starting node this and an edge fulfilling predicate. If the return value is not null, a path from this to such an edge is possible but not mandatory.

Link copied to clipboard

Returns an instance of FulfilledAndFailedPaths where FulfilledAndFailedPaths.fulfilled contains all possible shortest evaluation paths between the end node this and the start node fulfilling predicate. The paths are represented as lists of nodes. Paths which do not end at such a node are included in FulfilledAndFailedPaths.failed.

Link copied to clipboard

Returns all FunctionDeclaration children in this graph, starting with this Node.

Link copied to clipboard

Returns all Literal children in this graph, starting with this Node.

Link copied to clipboard

Returns all MemberCallExpression children in this graph, starting with this Node.

Link copied to clipboard

Returns all MethodDeclaration children in this graph, starting with this Node.

Link copied to clipboard
fun MetadataProvider.newAnnotation(name: CharSequence?, code: String? = null, rawNode: Any? = null): Annotation

Creates a new Annotation. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new AnnotationMember. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ArrayCreationExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ArrayRangeExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ArraySubscriptionExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ASMDeclarationStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new AssertStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newBinaryOperator(operatorCode: String, code: String? = null, rawNode: Any? = null): BinaryOperator

Creates a new BinaryOperator. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new BreakStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newCallExpression(callee: Expression? = null, fqn: CharSequence? = null, code: String? = null, template: Boolean = false, rawNode: Any? = null): CallExpression

Creates a new CallExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new CaseStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new CastExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newCatchClause(code: String? = null, rawNode: Any? = null): CatchClause

Creates a new CatchClause. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ClassTemplateDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new CompoundStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new CompoundStatementExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newConditionalExpression(condition: Expression, thenExpr: Expression?, elseExpr: Expression?, type: Type? = UnknownType.getUnknownType(), code: String? = null, rawNode: Any? = null): ConditionalExpression

Creates a new ConditionalExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newConstructExpression(name: CharSequence? = EMPTY_NAME, code: String? = null, rawNode: Any? = null): ConstructExpression

Creates a new ConstructExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ConstructorDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ContinueStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new DeclarationStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newDeclaredReferenceExpression(name: CharSequence?, type: Type? = UnknownType.getUnknownType(), code: String? = null, rawNode: Any? = null): DeclaredReferenceExpression

Creates a new DeclaredReferenceExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new DefaultStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new DeleteExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new DesignatedInitializerExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newDoStatement(code: String? = null, rawNode: Any? = null): DoStatement

Creates a new DoStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new EmptyStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new EnumConstantDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new EnumDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new CallExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ExpressionList. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newFieldDeclaration(name: CharSequence?, type: Type? = UnknownType.getUnknownType(), modifiers: List<String>? = listOf(), code: String? = null, location: PhysicalLocation? = null, initializer: Expression? = null, implicitInitializerAllowed: Boolean = false, rawNode: Any? = null): FieldDeclaration

Creates a new FieldDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ForEachStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newForStatement(code: String? = null, rawNode: Any? = null): ForStatement

Creates a new ForStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new FunctionDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new FunctionTemplateDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new GotoStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newIfStatement(code: String? = null, rawNode: Any? = null): IfStatement

Creates a new IfStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newIncludeDeclaration(includeFilename: CharSequence, code: String? = null, rawNode: Any? = null): IncludeDeclaration

Creates a new IncludeDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new InitializerListExpression. This is the top-most Node that a LanguageFrontend or Handler should create. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newKeyValueExpression(key: Expression? = null, value: Expression? = null, code: String? = null, rawNode: Any? = null): KeyValueExpression

Creates a new KeyValueExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new LabelStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new LambdaExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun <T> MetadataProvider.newLiteral(value: T, type: Type? = UnknownType.getUnknownType(), code: String? = null, rawNode: Any? = null): Literal<T>

Creates a new Literal. This is the top-most Node that a LanguageFrontend or Handler should create. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newMemberCallExpression(callee: Expression?, isStatic: Boolean = false, code: String? = null, rawNode: Any? = null): MemberCallExpression

Creates a new CallExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newMemberExpression(name: CharSequence?, base: Expression, memberType: Type? = UnknownType.getUnknownType(), operatorCode: String? = ".", code: String? = null, rawNode: Any? = null): MemberExpression

Creates a new MemberExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newMethodDeclaration(name: CharSequence?, code: String? = null, isStatic: Boolean = false, recordDeclaration: RecordDeclaration? = null, rawNode: Any? = null): MethodDeclaration

Creates a new MethodDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new NamespaceDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newNewExpression(code: String? = null, type: Type? = UnknownType.getUnknownType(), rawNode: Any? = null): NewExpression

Creates a new NewExpression. This is the top-most Node that a LanguageFrontend or Handler should create. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newParamVariableDeclaration(name: CharSequence?, type: Type? = UnknownType.getUnknownType(), variadic: Boolean = false, code: String? = null, rawNode: Any? = null): ParamVariableDeclaration

Creates a new MethodDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newPrimitiveType(name: String, modifier: ObjectType.Modifier = Modifier.SIGNED, qualifier: Type.Qualifier = Type.Qualifier()): ObjectType
Link copied to clipboard
fun MetadataProvider.newProblemDeclaration(problem: String = "", type: ProblemNode.ProblemType = ProblemNode.ProblemType.PARSING, code: String? = null, rawNode: Any? = null): ProblemDeclaration

Creates a new ProblemDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newProblemExpression(problem: String = "", type: ProblemNode.ProblemType = ProblemNode.ProblemType.PARSING, code: String? = null, rawNode: Any? = null): ProblemExpression

Creates a new ProblemExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new RecordDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new ReturnStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new SwitchStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new SynchronizedStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new TranslationUnitDeclaration. This is the top-most Node that a LanguageFrontend or Handler should create. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newTryStatement(code: String? = null, rawNode: Any? = null): TryStatement

Creates a new TryStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newTypedefDeclaration(targetType: Type, alias: Type, code: String? = null, rawNode: Any? = null): TypedefDeclaration

Creates a new TypedefDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new TypeExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newTypeIdExpression(operatorCode: String, type: Type?, referencedType: Type?, code: String? = null, rawNode: Any? = null): TypeIdExpression

Creates a new TypeIdExpression. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new TypeParamDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newUnaryOperator(operatorType: String, postfix: Boolean, prefix: Boolean, code: String? = null, rawNode: Any? = null): UnaryOperator

Creates a new UnaryOperator. This is the top-most Node that a LanguageFrontend or Handler should create. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newUsingDirective(code: String? = null, qualifiedName: CharSequence?, rawNode: Any? = null): UsingDirective

Creates a new UsingDirective. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard
fun MetadataProvider.newVariableDeclaration(name: CharSequence?, type: Type? = UnknownType.getUnknownType(), code: String? = null, implicitInitializerAllowed: Boolean = false, rawNode: Any? = null): VariableDeclaration

Creates a new VariableDeclaration. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Creates a new WhileStatement. The MetadataProvider receiver will be used to fill different meta-data using Node.applyMetadata. Calling this extension function outside of Kotlin requires an appropriate MetadataProvider, such as a LanguageFrontend as an additional prepended argument.

Link copied to clipboard

Returns all ParamVariableDeclaration children in this graph, starting with this Node.

Link copied to clipboard

A small utility extension function that uses the language information in a LanguageProvider (such as a Node, a Language, a LanguageFrontend or a Handler) to parse a fully qualified name.

Link copied to clipboard
fun LanguageProvider.parseType(name: CharSequence, resolveAlias: Boolean = false): @NotNull Type

Provides a nice alias to TypeParser.createFrom. In the future, this should not be used anymore since we are moving away from the TypeParser altogether.

Link copied to clipboard

Returns all RecordDeclaration children in this graph, starting with this Node.

Link copied to clipboard

Returns all DeclaredReferenceExpression children in this graph, starting with this Node.

Link copied to clipboard

Returns a new Inference object starting from this node.

Link copied to clipboard

Returns all VariableDeclaration children in this graph, starting with this Node.