AstForFunctionsCreator

io.joern.rubysrc2cpg.astcreation.AstForFunctionsCreator
trait AstForFunctionsCreator(packageContext: PackageContext)(implicit withSchemaValidation: ValidationMode)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AstCreator
Self type

Members list

Value members

Concrete methods

protected def astForBlockFunction(ctxStmt: StatementsContext, ctxParam: Option[BlockParameterContext], blockMethodName: String, lineStart: Int, lineEnd: Int, colStart: Int, colEnd: Int): Seq[Ast]

Creates a method, methodRef, and type decl binding for this block method.

Creates a method, methodRef, and type decl binding for this block method.

Attributes

def astForDefinedMethodNameOrSymbolContext(ctx: DefinedMethodNameOrSymbolContext): Seq[Ast]
protected def astForMethodDefinitionContext(ctx: MethodDefinitionContext): Seq[Ast]
protected def astForMethodNameContext(ctx: MethodNameContext): Seq[Ast]
protected def astForProcDefinitionContext(ctx: ProcDefinitionContext): Seq[Ast]
protected def methodForClosureStyleFn(ctx: ParserRuleContext): NewMethod
protected def methodRefAssignmentFromMethod(method: NewMethod, lineNum: Option[Integer], colNum: Option[Integer]): Ast

Creates a method ref node assigned to an identifier of the same name from a method and adds the identifier to the scope.

Creates a method ref node assigned to an identifier of the same name from a method and adds the identifier to the scope.

Attributes

protected def resolveAlias(name: String): String

Attributes

Returns

the method name if found as an alias, or the given name if not found.

protected def typeDeclFromMethod(method: NewMethod, lineNum: Option[Integer], colNum: Option[Integer]): NewTypeDecl

Concrete fields

protected val blockMethods: ListBuffer[Ast]
protected val methodAliases: HashMap[String, String]
protected val methodDefInArgument: ListBuffer[Ast]
protected val methodNameAsIdentifierStack: Stack[Ast]
protected val methodNameToMethod: HashMap[String, NewMethod]
protected val methodNamesWithYield: HashSet[String]