FunctionCallRefiner
class FunctionCallRefiner(context: Context, call: WalkedFunctionCall, isBlock: Boolean, initialArguments: List<FunctionCallArgument> = emptyList())
Refines a WalkedFunctionCall, which is a context-free syntactical element extracted from a function call in a source code, into a processed, context-aware FunctionCallNode.
This refiner also handles function chaining, which is represented by a linked list in the WalkedFunctionCall structure, but is a tree in the FunctionCallNode structure.
Example:
Source code:
.foo {x}::bar {y}
Walked function call:
.foo {x}
->.bar {y}
Refinement:
.bar {.foo {x}} {y}
Parameters
context
context of the function call
call
walked function call to refine
isBlock
whether the function call is a block
initialArguments
initial arguments to add to the function call (used internally for chaining)
Constructors
Link copied to clipboard
constructor(context: Context, call: WalkedFunctionCall, isBlock: Boolean, initialArguments: List<FunctionCallArgument> = emptyList())
Functions
Link copied to clipboard
Refines the walked function call into a FunctionCallNode.