LSP provides (0-based) Line and Character for a position:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
while a ast.SourcePos provides (1-based) Line, Col and (0-based) offset.
A helper function to take a Line and Col, and convert it back to an offset would be very helpful to an implementation that converts from a LSP Position to a SourcePos.