Package-level declarations

Functions

Link copied to clipboard

Creates a new CompoundStatement in the Fluent Node DSL and sets it to the FunctionDeclaration.body of the nearest enclosing FunctionDeclaration. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard
fun LanguageFrontend.call(name: CharSequence, isStatic: Boolean = false, init: CallExpression.() -> Unit? = null): CallExpression

Creates a new CallExpression (or MemberCallExpression) in the Fluent Node DSL with the given name and adds it to the nearest enclosing Holder. Depending on whether it is a StatementHolder it is added to the list of StatementHolder.statements or in case of an ArgumentHolder, the function ArgumentHolder.addArgument is invoked.

Link copied to clipboard

Configures the IfStatement.condition in the Fluent Node DSL of the nearest enclosing IfStatement. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new DeclarationStatement in the Fluent Node DSL and adds it to the StatementHolder.statements of the nearest enclosing StatementHolder. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new IfStatement in the Fluent Node DSL and sets it to the IfStatement.elseStatement of the nearest enclosing IfStatement. This simulates an else-if scenario. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new CompoundStatement in the Fluent Node DSL and sets it to the IfStatement.elseStatement of the nearest enclosing IfStatement. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new BinaryOperator with a == BinaryOperator.operatorCode in the Fluent Node DSL and invokes ArgumentHolder.addArgument of the nearest enclosing ArgumentHolder.

Link copied to clipboard
fun LanguageFrontend.function(name: CharSequence, returnType: Type = UnknownType.getUnknownType(), init: FunctionDeclaration.() -> Unit): FunctionDeclaration

Creates a new FunctionDeclaration in the Fluent Node DSL with the given name and optional returnType. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new IfStatement in the Fluent Node DSL and adds it to the StatementHolder.statements of the nearest enclosing StatementHolder. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new Literal in the Fluent Node DSL and invokes ArgumentHolder.addArgument of the nearest enclosing ArgumentHolder.

Link copied to clipboard
fun LanguageFrontend.param(name: CharSequence, type: Type = UnknownType.getUnknownType(), init: ParamVariableDeclaration.() -> Unit? = null): ParamVariableDeclaration

Creates a new ParamVariableDeclaration in the Fluent Node DSL and adds it to the FunctionDeclaration.parameters of the nearest enclosing FunctionDeclaration. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new BinaryOperator with a + BinaryOperator.operatorCode in the Fluent Node DSL and invokes ArgumentHolder.addArgument of the nearest enclosing ArgumentHolder.

Link copied to clipboard

Creates a new DeclaredReferenceExpression in the Fluent Node DSL and invokes ArgumentHolder.addArgument of the nearest enclosing ArgumentHolder.

Link copied to clipboard

Creates a new ReturnStatement in the Fluent Node DSL and adds it to the StatementHolder.statements of the nearest enclosing StatementHolder. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new Type with the given name in the Fluent Node DSL.

Link copied to clipboard

Creates a new CompoundStatement in the Fluent Node DSL and sets it to the IfStatement.thenStatement of the nearest enclosing IfStatement. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard

Creates a new TranslationUnitDeclaration in the Fluent Node DSL with the given name. The declaration will be set to the ScopeManager.globalScope. The init block can be used to create further sub-nodes as well as configuring the created node itself.

Link copied to clipboard
fun LanguageFrontend.variable(name: String, type: Type = UnknownType.getUnknownType(), init: VariableDeclaration.() -> Unit): VariableDeclaration

Creates a new VariableDeclaration in the Fluent Node DSL and adds it to the DeclarationStatement.declarations of the nearest enclosing DeclarationStatement. The init block can be used to create further sub-nodes as well as configuring the created node itself.