Commit 1a7b2fdb authored by David Owens II's avatar David Owens II

Start the line and column count at 1 instead of 0. This address:...

Start the line and column count at 1 instead of 0. This address: https://github.com/AnarchyTools/atbuild/issues/18.
parent cb28b45a
Pipeline #750 failed with stage
......@@ -26,8 +26,8 @@ final public class Scanner {
private var shouldStall = false
var line: Int = 0
var column: Int = 0
var line: Int = 1
var column: Int = 1
public init(content: String) {
self.content = content
......@@ -37,8 +37,8 @@ final public class Scanner {
func _defaults() {
self.index = content.startIndex
self.line = 0
self.column = 0
self.line = 1
self.column = 1
self.shouldStall = false
self.current = nil
}
......@@ -62,7 +62,7 @@ final public class Scanner {
if current?.character == "\n" {
line += 1
column = 0
column = 1
}
else {
column += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment