AstForFunctionsCreator

io.joern.rubysrc2cpg.astcreation.AstForFunctionsCreator
trait AstForFunctionsCreator(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 astForMethodAccessModifier(node: MethodAccessModifier): Seq[Ast]
protected def astForMethodDeclaration(node: RubyExpression & ProcedureDeclaration, isClosure: Boolean, isSingletonObjectMethod: Boolean, useSurroundingTypeFullName: Boolean): Seq[Ast]

Creates method declaration related structures.

Creates method declaration related structures.

Value parameters

isClosure

if true, will generate a type decl, type ref, and method ref, as well as add the c modifier.

node

the node to create the AST structure from.

Attributes

Returns

a method declaration with additional refs and types if specified.

protected def astForParameter(node: RubyExpression, index: Int): Ast
protected def createMethodTypeBindings(method: NewMethod, typeDecl: NewTypeDecl): Unit

Creates the bindings between the method and its types. This is useful for resolving function pointers and imports.

Creates the bindings between the method and its types. This is useful for resolving function pointers and imports.

Attributes

protected def currentAccessModifier: String
protected def popAccessModifier(): Unit
protected def pushAccessModifier(name: String): Unit

Concrete fields

protected val closureToRefs: Map[RubyExpression, Seq[NewNode]]

As expressions may be discarded, we cannot store closure ASTs in the diffgraph at the point of creation. So we assume every reference to this map means that the closure AST was successfully propagated.

As expressions may be discarded, we cannot store closure ASTs in the diffgraph at the point of creation. So we assume every reference to this map means that the closure AST was successfully propagated.

Attributes