Code review comment: Can't we deal with the offsets here? Instead of the lines and columns?

Code before review:
public static SignatureHelp getSignatureHelp(SignatureContext context) {
fillTokenInfoAtCursor(context);
int activeParamIndex = 0;
Optional<NonTerminalNode> sNode = context.getNodeAtCursor();
if (sNode.isEmpty()) {
return null;
}
SyntaxKind sKind = sNode.get().kind();
NonTerminalNode evalNode = sNode.get();
while (evalNode != null &&
sKind != SyntaxKind.FUNCTION_CALL &&
sKind != SyntaxKind.METHOD_CALL &&
sKind != SyntaxKind.REMOTE_METHOD_CALL_ACTION &&
sKind != SyntaxKind.IMPLICIT_NEW_EXPRESSION &&
sKind != SyntaxKind.EXPLICIT_NEW_EXPRESSION) {
evalNode = evalNode.parent();
sKind = (evalNode != null) ? evalNode.kind() : null;
}
if (evalNode == null) {
return null;
}
ChildNodeList childrenInParen = evalNode.children();
switch (sKind) {
case IMPLICIT_NEW_EXPRESSION:
Optional<ParenthesizedArgList> implicitArgList =
((ImplicitNewExpressionNode) evalNode).parenthesizedArgList();
if (implicitArgList.isPresent()) {
childrenInParen = implicitArgList.get().children();
}
break;
case EXPLICIT_NEW_EXPRESSION:
childrenInParen = ((ExplicitNewExpressionNode) evalNode).parenthesizedArgList().children();
break;
}
int cLine = context.getCursorPosition().getLine();
int cCol = context.getCursorPosition().getCharacter();
for (Node child : childrenInParen) {
int sLine = child.lineRange().startLine().line();
int sCol = child.lineRange().startLine().offset();
if ((cLine == sLine && cCol < sCol) || (cLine < sLine)) {
break;
}
if (child.kind() == SyntaxKind.COMMA_TOKEN) {
activeParamIndex++;
}
}
List<SignatureInformation> signatures = new ArrayList<>();
Optional<SignatureInformation> signatureInfo = SignatureHelpUtil.getSignatureInformation(context);
signatureInfo.ifPresent(signatures::add);
SignatureHelp signatureHelp = new SignatureHelp();
signatureHelp.setActiveParameter(activeParamIndex);
signatureHelp.setActiveSignature(0);
signatureHelp.setSignatures(signatures);
return signatureHelp;
}

Line under review: }

Code after addressing the review:
public static SignatureHelp getSignatureHelp(SignatureContext context) {
fillTokenInfoAtCursor(context);
Optional<NonTerminalNode> sNode = context.getNodeAtCursor();
if (sNode.isEmpty()) {
return null;
}
SyntaxKind sKind = sNode.get().kind();
NonTerminalNode evalNode = sNode.get();
while (evalNode != null &&
sKind != SyntaxKind.FUNCTION_CALL &&
sKind != SyntaxKind.METHOD_CALL &&
sKind != SyntaxKind.REMOTE_METHOD_CALL_ACTION &&
sKind != SyntaxKind.IMPLICIT_NEW_EXPRESSION &&
sKind != SyntaxKind.EXPLICIT_NEW_EXPRESSION) {
evalNode = evalNode.parent();
sKind = (evalNode != null) ? evalNode.kind() : null;
}
if (evalNode == null) {
return null;
}
ChildNodeList childrenInParen = evalNode.children();
switch (sKind) {
case IMPLICIT_NEW_EXPRESSION:
Optional<ParenthesizedArgList> implicitArgList =
((ImplicitNewExpressionNode) evalNode).parenthesizedArgList();
if (implicitArgList.isPresent()) {
childrenInParen = implicitArgList.get().children();
}
break;
case EXPLICIT_NEW_EXPRESSION:
childrenInParen = ((ExplicitNewExpressionNode) evalNode).parenthesizedArgList().children();
break;
default:
break;
}
int activeParamIndex = 0;
int cursorPosition = context.getCursorPositionInTree();
for (Node child : childrenInParen) {
int childPosition = child.textRange().endOffset();
if (cursorPosition < childPosition) {
break;
}
if (child.kind() == SyntaxKind.COMMA_TOKEN) {
activeParamIndex++;
}
}
List<SignatureInformation> signatures = new ArrayList<>();
Optional<SignatureInformation> signatureInfo = SignatureHelpUtil.getSignatureInformation(context);
signatureInfo.ifPresent(signatures::add);
SignatureHelp signatureHelp = new SignatureHelp();
signatureHelp.setActiveParameter(activeParamIndex);
signatureHelp.setActiveSignature(0);
signatureHelp.setSignatures(signatures);
return signatureHelp;
}