klyn.code.ast.SourceRange.withEnd
method
public withEnd(newEndLine as Long, newEndColumn as Long = 0) as SourceRange
Description

Returns a new SourceRange with an updated endLine and endColumn.

Parameters
ParameterDescription
newEndLineUpdated zero-based end line.
newEndColumnUpdated zero-based end column.
Returns

Updated SourceRange.

Example
import klyn.code.ast

r = SourceRange(1, 0, 1, 10).withEnd(5, 0)
assert r.endLine == 5