FunctionCallRefiner
class FunctionCallRefiner(context: Context, call: WalkedFunctionCall, isBlock: Boolean, sourceRange: IntRange?, 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
sourceRange
if available, the range of the function call in the source code
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, sourceRange: IntRange?, initialArguments: List<FunctionCallArgument> = emptyList())
Functions
Link copied to clipboard
Refines the walked function call into a FunctionCallNode.