We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 706ad90 commit ad1bb44Copy full SHA for ad1bb44
1 file changed
src/Main/PosHelper.fs
@@ -2,6 +2,13 @@
2
3
open CWTools.Utilities.Position
4
5
+module Line =
6
+ // Visual Studio uses line counts starting at 0, F# uses them starting at 1
7
+ let fromZ (line: Line0) = int line + 1
8
+
9
+ let toZ (line: int) : Line0 =
10
+ LanguagePrimitives.Int32WithMeasure(line - 1)
11
12
module PosHelper =
- let fromZ (line: Line0) idx = mkPos (Line.fromZ line) idx
- let toZ (p: pos) = (Line.toZ p.Line, p.Column)
13
+ let fromZ (line: Line0) idx = mkPos (Line.fromZ line) idx
14
+ let toZ (p: pos) = (Line.toZ p.Line, p.Column)
0 commit comments