about summary refs log tree commit diff
path: root/pkg/libs
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/libs')
-rw-r--r--pkg/libs/source/loc.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/libs/source/loc.go b/pkg/libs/source/loc.go
index 3089d3b..f43b5c0 100644
--- a/pkg/libs/source/loc.go
+++ b/pkg/libs/source/loc.go
@@ -1,5 +1,7 @@
 package source
 
+import "fmt"
+
 type Loc struct {
 	Row int
 	Col int
@@ -8,3 +10,7 @@ type Loc struct {
 func NewLoc(row, col int) Loc {
 	return Loc{row, col}
 }
+
+func (l Loc) String() string {
+	return fmt.Sprintf("%d:%d", l.Row+1, l.Col)
+}