AstCreator

io.joern.rubysrc2cpg.astcreation.AstCreator
class AstCreator(val filename: String, global: Global, parser: ResourceManagedParser, packageContext: PackageContext, projectRoot: Option[String]) extends AstCreatorBase, AstNodeBuilder[ParserRuleContext, AstCreator], AstForPrimitivesCreator, AstForStatementsCreator, AstForExpressionsCreator, AstForDeclarationsCreator, AstForTypesCreator, AstCreatorHelper

Attributes

Graph
Supertypes
trait AstNodeBuilder[ParserRuleContext, AstCreator]
class AstCreatorBase
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

object RubyOperators

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Inherited classlikes

implicit protected class BlockContextExt(val ctx: BlockContext)

Attributes

Inherited from:
AstForStatementsCreator
Supertypes
class Object
trait Matchable
class Any
implicit class ClassDefinitionPrimaryContextExt(val ctx: ClassDefinitionPrimaryContext)

Attributes

Inherited from:
AstForTypesCreator
Supertypes
class Object
trait Matchable
class Any
implicit class ClassOrModuleReferenceContextExt(val ctx: ClassOrModuleReferenceContext)

Attributes

Inherited from:
AstForTypesCreator
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def astForArgumentsWithParenthesesContext(ctx: ArgumentsWithParenthesesContext): Seq[Ast]
def astForAssignmentLikeMethodIdentifierContext(ctx: AssignmentLikeMethodIdentifierContext): Seq[Ast]
def astForAssociationContext(ctx: AssociationContext): Seq[Ast]
def astForAssociationsContext(ctx: AssociationsContext): Seq[Ast]
def astForBeginExpressionPrimaryContext(ctx: BeginExpressionPrimaryContext): Seq[Ast]
def astForBlockMethod(ctxStmt: StatementsContext, ctxParam: Option[BlockParameterContext], blockMethodName: String, lineStart: Int, lineEnd: Int, colStart: Int, colEnd: Int): Seq[Ast]
def astForBlockParameterContext(ctx: BlockParameterContext): Seq[Ast]
def astForBlockParametersContext(ctx: BlockParametersContext): Seq[Ast]
def astForBodyStatementContext(ctx: BodyStatementContext, isMethodBody: Boolean): Seq[Ast]
def astForCallNode(ctx: ParserRuleContext, code: String, isYieldBlock: Boolean): Ast
def astForCaseExpressionPrimaryContext(ctx: CaseExpressionPrimaryContext): Seq[Ast]
def astForChainedCommandWithDoBlockContext(ctx: ChainedCommandWithDoBlockContext): Seq[Ast]
def astForChainedInvocationPrimaryContext(ctx: ChainedInvocationPrimaryContext): Seq[Ast]
def astForChainedInvocationWithoutArgumentsPrimaryContext(ctx: ChainedInvocationWithoutArgumentsPrimaryContext): Seq[Ast]
def astForChainedScopedConstantReferencePrimaryContext(ctx: ChainedScopedConstantReferencePrimaryContext): Seq[Ast]
def astForClassBody(ctx: BodyStatementContext): Seq[Ast]

Handles body statements differently from astForBodyStatementContext by noting that method definitions should be on the root level and assignments where the LHS starts with @@ should be treated as fields.

Handles body statements differently from astForBodyStatementContext by noting that method definitions should be on the root level and assignments where the LHS starts with @@ should be treated as fields.

Attributes

def astForCommandWithDoBlockContext(ctx: CommandWithDoBlockContext): Seq[Ast]
def astForDefinedMethodNameContext(ctx: DefinedMethodNameContext): Seq[Ast]
def astForDefinedMethodNameOrSymbolContext(ctx: DefinedMethodNameOrSymbolContext): Seq[Ast]
def astForExpressionContext(ctx: ExpressionContext): Seq[Ast]
def astForForVariableContext(ctx: ForVariableContext): Seq[Ast]
def astForGroupedLeftHandSideContext(ctx: GroupedLeftHandSideContext): Seq[Ast]
def astForHashConstructorPrimaryContext(ctx: HashConstructorPrimaryContext): Seq[Ast]
def astForIndexingArgumentsContext(ctx: IndexingArgumentsContext): Seq[Ast]
def astForIndexingExpressionPrimaryContext(ctx: IndexingExpressionPrimaryContext): Seq[Ast]
def astForInvocationExpressionOrCommandContext(ctx: InvocationExpressionOrCommandContext): Seq[Ast]
def astForInvocationWithBlockOnlyPrimaryContext(ctx: InvocationWithBlockOnlyPrimaryContext): Seq[Ast]
def astForInvocationWithParenthesesPrimaryContext(ctx: InvocationWithParenthesesPrimaryContext): Seq[Ast]
def astForInvocationWithoutParenthesesContext(ctx: InvocationWithoutParenthesesContext): Seq[Ast]
def astForJumpExpressionPrimaryContext(ctx: JumpExpressionPrimaryContext): Seq[Ast]
def astForMethodDefinitionContext(ctx: MethodDefinitionContext): Seq[Ast]
def astForMethodIdentifierContext(ctx: MethodIdentifierContext, code: String): Seq[Ast]
def astForMethodNameContext(ctx: MethodNameContext): Seq[Ast]
def astForMethodNamePartContext(ctx: MethodNamePartContext): Seq[Ast]
def astForMethodOnlyIdentifier(ctx: MethodOnlyIdentifierContext): Seq[Ast]
def astForMethodParameterPartContext(ctx: MethodParameterPartContext): Seq[Ast]
def astForMultipleAssignmentExpressionContext(ctx: MultipleAssignmentExpressionContext): Seq[Ast]
def astForMultipleLeftHandSideContext(ctx: MultipleLeftHandSideContext): Seq[Ast]
def astForMultipleRightHandSideContext(ctx: MultipleRightHandSideContext): Seq[Ast]
def astForOperatorMethodNameContext(ctx: OperatorMethodNameContext): Seq[Ast]
def astForPackingLeftHandSideContext(ctx: PackingLeftHandSideContext): Seq[Ast]
def astForPrimaryContext(ctx: PrimaryContext): Seq[Ast]
def astForProcDefinitionContext(ctx: ProcDefinitionContext): Seq[Ast]
def astForRescueClauseContext(ctx: RescueClauseContext): Ast
def astForSimpleMethodNamePartContext(ctx: SimpleMethodNamePartContext): Seq[Ast]
def astForSimpleScopedConstantReferencePrimaryContext(ctx: SimpleScopedConstantReferencePrimaryContext): Seq[Ast]
def astForSingleAssignmentExpressionContext(ctx: SingleAssignmentExpressionContext): Seq[Ast]
def astForSingleLeftHandSideContext(ctx: SingleLeftHandSideContext): Seq[Ast]
def astForSingletonMethodNamePartContext(ctx: SingletonMethodNamePartContext): Seq[Ast]
def astForSingletonObjectContext(ctx: SingletonObjectContext): Seq[Ast]
def astForStringInterpolationContext(ctx: InterpolatedStringExpressionContext): Seq[Ast]
def astForWhenArgumentContext(ctx: WhenArgumentContext): Seq[Ast]
override def createAst(): DiffGraphBuilder

Attributes

Definition Classes
AstCreatorBase
def getPackedRHS(astsToConcat: Seq[Ast]): Seq[Ast]

Inherited methods

def absolutePath(filename: String): String

Absolute path for the given file name

Absolute path for the given file name

Attributes

Inherited from:
AstCreatorBase
def annotationAssignmentAst(assignmentValueName: String, code: String, assignmentAst: Ast): Ast

Creates an AST that represents an annotation assignment with a name for the assigned value, its overall code, and the respective assignment AST.

Creates an AST that represents an annotation assignment with a name for the assigned value, its overall code, and the respective assignment AST.

Attributes

Inherited from:
AstCreatorBase
def annotationAst(annotation: NewAnnotation, children: Seq[Ast]): Ast

Creates an AST that represents an annotation, including its content (annotation parameter assignments).

Creates an AST that represents an annotation, including its content (annotation parameter assignments).

Attributes

Inherited from:
AstCreatorBase
protected def annotationNode(node: ParserRuleContext, code: String, name: String, fullName: String): NewAnnotation

Attributes

Inherited from:
AstNodeBuilder
protected def astForAdditiveExpression(ctx: AdditiveExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForAliasStatement(ctx: AliasStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForAndExpression(ctx: OperatorAndExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForAndExpressionOrCommand(ctx: OrAndExpressionOrCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForArgument(ctx: ArgumentContext): Seq[Ast]

Attributes

Inherited from:
AstForDeclarationsCreator
protected def astForArguments(ctx: ArgumentsContext): Seq[Ast]

Attributes

Inherited from:
AstForDeclarationsCreator
protected def astForArrayLiteral(ctx: ArrayConstructorContext): Seq[Ast]

Attributes

Inherited from:
AstForPrimitivesCreator
def astForAssignment(lhs: NewNode, rhs: NewNode, lineNumber: Option[Integer], colNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorHelper
protected def astForBeginStatement(ctx: BeginStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForBitwiseAndExpression(ctx: BitwiseAndExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForBitwiseOrExpression(ctx: BitwiseOrExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForBitwiseShiftExpression(ctx: BitwiseShiftExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForBlock(ctx: BlockContext, blockMethodName: Option[String]): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForBraceBlock(ctx: BraceBlockContext, blockMethodName: Option[String]): Ast

Attributes

Inherited from:
AstForStatementsCreator
def astForClassDeclaration(ctx: ClassDefinitionPrimaryContext): Seq[Ast]

Attributes

Inherited from:
AstForTypesCreator
def astForClassExpression(ctx: ClassDefinitionPrimaryContext): Seq[Ast]

Attributes

Inherited from:
AstForTypesCreator
protected def astForCommand(ctx: CommandContext): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForCompoundStatement(ctx: CompoundStatementContext, isMethodBody: Boolean, canConsiderAsLeaf: Boolean): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForConcatenatedStringExpressions(ctx: ConcatenatedStringExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForDoBlock(ctx: DoBlockContext, blockMethodName: Option[String]): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForDoubleQuotedStringLiteral(ctx: DoubleQuotedStringLiteralContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForEncodingPseudoIdentifier(ctx: EncodingPseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForEndStatement(ctx: EndStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForEqualityExpression(ctx: EqualityExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForExpressionOrCommand(ctx: ExpressionOrCommandContext): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForFalseLiteral(ctx: FalsePseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForFieldAccess(ctx: ParserRuleContext, baseNode: NewNode): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForFilePseudoIdentifier(ctx: FilePseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForForExpression(ctx: ForExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForIfExpression(ctx: IfExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForIfModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForIsDefinedExpression(ctx: IsDefinedExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForIsDefinedPrimaryExpression(ctx: IsDefinedPrimaryContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForLinePseudoIdentifier(ctx: LinePseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForLiteralPrimaryExpression(ctx: LiteralPrimaryContext): Seq[Ast]

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForMemberAccessCommand(ctx: MemberAccessCommandContext): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
def astForModuleDefinitionPrimaryContext(ctx: ModuleDefinitionPrimaryContext): Seq[Ast]

Attributes

Inherited from:
AstForTypesCreator
protected def astForMultiplicativeExpression(ctx: MultiplicativeExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForMultiplicativePercentExpression(ctx: MultiplicativeExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForMultiplicativeSlashExpression(ctx: MultiplicativeExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForMultiplicativeStarExpression(ctx: MultiplicativeExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForNilLiteral(ctx: NilPseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForNonExpandedQuotedRegularExpressionLiteral(ctx: NonExpandedQuotedRegularExpressionLiteralContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForNotKeywordExpressionOrCommand(ctx: NotExpressionOrCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForNumericLiteral(ctx: NumericLiteralContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForOrAndExpressionOrCommand(ctx: OrAndExpressionOrCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForOrExpression(ctx: OperatorOrExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForOrExpressionOrCommand(ctx: OrAndExpressionOrCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForPowerExpression(ctx: PowerExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
def astForRangeExpressionContext(ctx: RangeExpressionContext): Seq[Ast]

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForRegexInterpolationPrimaryContext(ctx: RegexInterpolationContext): Seq[Ast]

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForRegularExpressionLiteral(ctx: RegularExpressionLiteralContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForRelationalExpression(ctx: RelationalExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForRescueModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForSelfPseudoIdentifier(ctx: SelfPseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForSimpleMethodCommand(ctx: SimpleMethodCommandContext): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForSimpleString(ctx: SimpleStringContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForSingleQuotedStringLiteral(ctx: SingleQuotedStringLiteralContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForStatement(ctx: StatementContext): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForStatements(ctx: StatementsContext, isMethodBody: Boolean, canConsiderAsLeaf: Boolean): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def astForStringExpression(ctx: StringExpressionContext): Seq[Ast]

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForSuperCall(ctx: ParserRuleContext, arguments: Seq[Ast]): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForSuperCommand(ctx: SuperCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForSuperExpression(ctx: SuperExpressionPrimaryContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForSymbol(ctx: SymbolContext): Seq[Ast]

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForSymbolLiteral(ctx: SymbolContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForTernaryConditionalOperator(ctx: ConditionalOperatorExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForTrueLiteral(ctx: TruePseudoVariableIdentifierContext): Ast

Attributes

Inherited from:
AstForPrimitivesCreator
protected def astForUnaryExpression(ctx: UnaryExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForUnaryMinusExpression(ctx: UnaryMinusExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForUndefStatement(ctx: UndefStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForUnlessExpression(ctx: UnlessExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForUnlessModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForUntilExpression(ctx: UntilExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForUntilModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForVariableIdentifierHelper(ctx: VariableIdentifierContext, definitelyIdentifier: Boolean): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForVariableReference(ctx: VariableReferenceContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForWhileExpression(ctx: WhileExpressionContext): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForWhileModifierStatement(ctx: ModifierStatementContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def astForYieldCall(ctx: ParserRuleContext, argumentsCtx: Option[ArgumentsContext]): Ast

Attributes

Inherited from:
AstForExpressionsCreator
protected def astForYieldCommand(ctx: YieldCommandContext): Ast

Attributes

Inherited from:
AstForStatementsCreator
def blockAst(blockNode: NewBlock, statements: List[Ast]): Ast

For a given block node and statement ASTs, create an AST that represents the block. The main purpose of this method is to increase the readability of the code which creates block asts.

For a given block node and statement ASTs, create an AST that represents the block. The main purpose of this method is to increase the readability of the code which creates block asts.

Attributes

Inherited from:
AstCreatorBase
protected def blockNode(node: ParserRuleContext, code: String, typeFullName: String): NewBlock

Attributes

Inherited from:
AstNodeBuilder
protected def blockNode(node: ParserRuleContext): NewBlock

Attributes

Inherited from:
AstNodeBuilder
def callAst(callNode: NewCall, arguments: Seq[Ast], base: Option[Ast], receiver: Option[Ast]): Ast

Create an abstract syntax tree for a call, including CPG-specific edges required for arguments and the receiver.

Create an abstract syntax tree for a call, including CPG-specific edges required for arguments and the receiver.

Our call representation is inspired by ECMAScript, that is, in addition to arguments, a call has a base and a receiver. For languages other than Javascript, leave receiver empty for now.

Value parameters

arguments

arguments (without the base argument (instance))

base

the value to use as this in the method call.

callNode

the node that represents the entire call

receiver

the object in which the property lookup is performed

Attributes

Inherited from:
AstCreatorBase
def callNode(node: ParserRuleContext, code: String, name: String, methodFullName: String, dispatchType: String, signature: Option[String], typeFullName: Option[String]): NewCall

Attributes

Inherited from:
AstNodeBuilder
def callNode(node: ParserRuleContext, code: String, name: String, methodFullName: String, dispatchType: String): NewCall

Attributes

Inherited from:
AstNodeBuilder
protected def codeOf(node: NewNode): String

Attributes

Inherited from:
AstCreatorHelper
def controlStructureAst(controlStructureNode: NewControlStructure, condition: Option[Ast], children: Seq[Ast], placeConditionLast: Boolean): Ast

For a given node, condition AST and children ASTs, create an AST that represents the control structure. The main purpose of this method is to automatically assign the correct condition edges.

For a given node, condition AST and children ASTs, create an AST that represents the control structure. The main purpose of this method is to automatically assign the correct condition edges.

Attributes

Inherited from:
AstCreatorBase
protected def controlStructureNode(node: ParserRuleContext, controlStructureType: String, code: String): NewControlStructure

Attributes

Inherited from:
AstNodeBuilder
protected def createFieldAccess(baseNode: NewNode, fieldName: String, lineNumber: Option[Integer], colNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorHelper
protected def createMethodParameterIn(name: String, lineNumber: Option[Integer], colNumber: Option[Integer], typeFullName: String, order: Int, index: Int): NewMethodParameterIn

Attributes

Inherited from:
AstCreatorHelper
def doWhileAst(condition: Option[Ast], body: Seq[Ast], code: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorBase
protected def fieldIdentifierNode(node: ParserRuleContext, name: String, code: String): NewFieldIdentifier

Attributes

Inherited from:
AstNodeBuilder
def forAst(forNode: NewControlStructure, locals: Seq[Ast], initAsts: Seq[Ast], conditionAsts: Seq[Ast], updateAsts: Seq[Ast], bodyAsts: Seq[Ast]): Ast

Attributes

Inherited from:
AstCreatorBase
def forAst(forNode: NewControlStructure, locals: Seq[Ast], initAsts: Seq[Ast], conditionAsts: Seq[Ast], updateAsts: Seq[Ast], bodyAst: Ast): Ast

Attributes

Inherited from:
AstCreatorBase
def getUnusedVariableNames(usedVariableNames: HashMap[String, Int], variableName: String): String

Attributes

Inherited from:
AstCreatorHelper
def globalNamespaceBlock(): NewNamespaceBlock

Create a global namespace block for the given filename

Create a global namespace block for the given filename

Attributes

Inherited from:
AstCreatorBase
protected def identifierNode(node: ParserRuleContext, name: String, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewIdentifier

Attributes

Inherited from:
AstNodeBuilder
def isBuiltin(x: String): Boolean

Attributes

Inherited from:
AstCreatorHelper
protected def jumpTargetNode(node: ParserRuleContext, name: String, code: String, parserTypeName: Option[String]): NewJumpTarget

Attributes

Inherited from:
AstNodeBuilder
protected def lastStmtAsReturn(code: String, lastStmtAst: Ast): Ast

Attributes

Inherited from:
AstForStatementsCreator
protected def literalNode(node: ParserRuleContext, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewLiteral

Attributes

Inherited from:
AstNodeBuilder
protected def localNode(node: ParserRuleContext, name: String, code: String, typeFullName: String, closureBindingId: Option[String]): NewLocal

Attributes

Inherited from:
AstNodeBuilder
protected def memberNode(node: ParserRuleContext, name: String, code: String, typeFullName: String, dynamicTypeHints: Seq[String]): NewMember

Attributes

Inherited from:
AstNodeBuilder
protected def memberNode(node: ParserRuleContext, name: String, code: String, typeFullName: String): NewMember

Attributes

Inherited from:
AstNodeBuilder
def membersFromStatementAsts(ast: Ast): Seq[Ast]

Attributes

Inherited from:
AstForTypesCreator
def methodAst(method: NewMethod, parameters: Seq[Ast], body: Ast, methodReturn: NewMethodReturn, modifiers: Seq[NewModifier]): Ast

Creates an AST that represents an entire method, including its content.

Creates an AST that represents an entire method, including its content.

Attributes

Inherited from:
AstCreatorBase
def methodAstWithAnnotations(method: NewMethod, parameters: Seq[Ast], body: Ast, methodReturn: NewMethodReturn, modifiers: Seq[NewModifier], annotations: Seq[Ast]): Ast

Creates an AST that represents an entire method, including its content and with support for both method and parameter annotations.

Creates an AST that represents an entire method, including its content and with support for both method and parameter annotations.

Attributes

Inherited from:
AstCreatorBase
protected def methodNode(node: ParserRuleContext, name: String, code: String, fullName: String, signature: Option[String], fileName: String, astParentType: Option[String], astParentFullName: Option[String]): NewMethod

Attributes

Inherited from:
AstNodeBuilder
def methodNode(node: ParserRuleContext, name: String, fullName: String, signature: String, fileName: String): NewMethod

Attributes

Inherited from:
AstNodeBuilder
protected def methodRefNode(node: ParserRuleContext, code: String, methodFullName: String, typeFullName: String): NewMethodRef

Attributes

Inherited from:
AstNodeBuilder
protected def methodReturnNode(node: ParserRuleContext, typeFullName: String): NewMethodReturn

Attributes

Inherited from:
AstNodeBuilder
def methodStubAst(method: NewMethod, parameters: Seq[NewMethodParameterIn], methodReturn: NewMethodReturn, modifiers: Seq[NewModifier]): Ast

Creates an AST that represents a method stub, containing information about the method, its parameters, and the return type.

Creates an AST that represents a method stub, containing information about the method, its parameters, and the return type.

Attributes

Inherited from:
AstCreatorBase
protected def newFieldIdentifier(ctx: ParserRuleContext): NewFieldIdentifier

Attributes

Inherited from:
AstForExpressionsCreator
protected def newImportNode(code: String, importedEntity: String, importedAs: String, include: ParserRuleContext): NewImport

Attributes

Inherited from:
AstNodeBuilder
protected def parameterInNode(node: ParserRuleContext, name: String, code: String, index: Int, isVariadic: Boolean, evaluationStrategy: String, typeFullName: Option[String]): NewMethodParameterIn

Attributes

Inherited from:
AstNodeBuilder
protected def parameterInNode(node: ParserRuleContext, name: String, code: String, index: Int, isVariadic: Boolean, evaluationStrategy: String, typeFullName: String): NewMethodParameterIn

Attributes

Inherited from:
AstNodeBuilder
def prefixAsBuiltin(x: String): String

Attributes

Inherited from:
AstCreatorHelper
protected def resolveRelativePath(currentFile: String, argsAst: Seq[Ast], callNode: NewCall): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
protected def resolveRequireOrLoadPath(argsAst: Seq[Ast], callNode: NewCall): Seq[Ast]

Attributes

Inherited from:
AstForStatementsCreator
def returnAst(returnNode: NewReturn, arguments: Seq[Ast]): Ast

For a given return node and arguments, create an AST that represents the return instruction. The main purpose of this method is to automatically assign the correct argument indices.

For a given return node and arguments, create an AST that represents the return instruction. The main purpose of this method is to automatically assign the correct argument indices.

Attributes

Inherited from:
AstCreatorBase
protected def returnNode(node: ParserRuleContext, code: String): NewReturn

Attributes

Inherited from:
AstNodeBuilder
def setArgumentIndices(arguments: Seq[Ast]): Unit

Attributes

Inherited from:
AstCreatorBase
def staticInitMethodAst(initAsts: List[Ast], fullName: String, signature: Option[String], returnType: String, fileName: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorBase
def tryCatchAst(tryNode: NewControlStructure, tryBodyAst: Ast, catchAsts: Seq[Ast], finallyAst: Option[Ast]): Ast

For the given try body, catch ASTs and finally AST, create a try-catch-finally AST with orders set correctly for the ossdataflow engine.

For the given try body, catch ASTs and finally AST, create a try-catch-finally AST with orders set correctly for the ossdataflow engine.

Attributes

Inherited from:
AstCreatorBase
protected def typeDeclNode(node: ParserRuleContext, name: String, fullName: String, filename: String, code: String, astParentType: String, astParentFullName: String, inherits: Seq[String], alias: Option[String]): NewTypeDecl

Attributes

Inherited from:
AstNodeBuilder
def typeDeclNode(node: ParserRuleContext, name: String, fullName: String, fileName: String, inheritsFrom: Seq[String], alias: Option[String]): NewTypeDecl

Attributes

Inherited from:
AstNodeBuilder
protected def typeRefNode(node: ParserRuleContext, code: String, typeFullName: String): NewTypeRef

Attributes

Inherited from:
AstNodeBuilder
protected def unknownNode(node: ParserRuleContext, code: String): NewUnknown

Attributes

Inherited from:
AstNodeBuilder
def whileAst(condition: Option[Ast], body: Seq[Ast], code: Option[String], lineNumber: Option[Integer], columnNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorBase
def withArgumentIndex[T <: ExpressionNew](node: T, argIdxOpt: Option[Int]): T

Attributes

Inherited from:
AstCreatorBase
def withArgumentName[T <: ExpressionNew](node: T, argNameOpt: Option[String]): T

Attributes

Inherited from:
AstCreatorBase
def withIndex[T, X](nodes: Array[T])(f: (T, Int) => X): Seq[X]

Attributes

Inherited from:
AstCreatorBase
def withIndex[T, X](nodes: Seq[T])(f: (T, Int) => X): Seq[X]

Attributes

Inherited from:
AstCreatorBase
def wrapMultipleInBlock(asts: Seq[Ast], lineNumber: Option[Integer]): Ast

Attributes

Inherited from:
AstCreatorBase

Inherited fields

val diffGraph: DiffGraphBuilder

Attributes

Inherited from:
AstCreatorBase
protected val fieldReferences: HashMap[String, Set[ParserRuleContext]]

Attributes

Inherited from:
AstForTypesCreator
protected var lastModifier: Option[String]

Attributes

Inherited from:
AstForExpressionsCreator

Implicits

Inherited implicits

final implicit protected def BlockContextExt(ctx: BlockContext): BlockContextExt

Attributes

Inherited from:
AstForStatementsCreator
final implicit def ClassDefinitionPrimaryContextExt(ctx: ClassDefinitionPrimaryContext): ClassDefinitionPrimaryContextExt

Attributes

Inherited from:
AstForTypesCreator
final implicit def ClassOrModuleReferenceContextExt(ctx: ClassOrModuleReferenceContext): ClassOrModuleReferenceContextExt

Attributes

Inherited from:
AstForTypesCreator