If one clicks on a block control element (like for or endwhile), their corresponding closing or opening partner should be highlighted.
Analysis:
This can be achieved by adding two custom functions only active for NPRC and NSCR: MakeBlockCheck() and getMatchingBlock(). In addition, another indicator is needed, which shall be cleared, when the brace and the occurence highlighter are cleared.
Implementation:
Functionality was implemented as proposed by the analysis mit the exception that a third function was implemented
vector<int> BlockMatch(int)
which is doing more or less the whole matching work and can be used in other functions as well. It returns a vector<int> to allow highlighting the intermediary flow tokens else and elseif as well.
Documentation:
Not needed. Functionality is self-describing.
Tests:
Block highlighting works as expected. No deviations detected. Functionality implemented successfully.
Anonymous
Diff:
Diff:
Diff:
Diff: