Class NestedMatchingCompletion
A completion used for conditions in pattern matching:
in x if x == 5 then puts "five"
in x unless x == 4 then puts "not four"
The outer (Matching) completion indicates whether there is a match, and the inner (Boolean) completion indicates what the condition evaluated to.
For the condition x == 5
above, TNestedCompletion(true, true, 0)
and
TNestedCompletion(false, false, 0)
are both valid completions, while
TNestedCompletion(true, false, 0)
and TNestedCompletion(false, true, 0)
are valid completions for x == 4
.
Import path
import codeql.ruby.controlflow.internal.Completion
Direct supertypes
Indirect supertypes
Inherited fields
Predicates
getAMatchingSuccessorType | Gets a successor type that matches this completion. |
getInnerCompletion | Gets the inner completion. This is either the inner completion, when the completion is nested, or the completion itself. |
getOuterCompletion | Gets the outer completion. This is either the outer completion, when the completion is nested, or the completion itself. |
toString | Gets a textual representation of this completion. |
Inherited predicates
continuesLoop | Holds if this completion will continue a loop when it is the completion of a loop body. | from Completion |
getAnInnerCompatibleCompletion | Gets a completion that is compatible with the inner completion. | from NestedCompletion |
getNestLevel | Gets the level of this nested completion. | from NestedCompletion |
getValue | Gets the Boolean value of this conditional completion. | from ConditionalCompletion |
isValidFor | Holds if this completion is valid for node | from Completion |