scanner: adapt example_test.go
diff --git a/scanner/example_test.go b/scanner/example_test.go
index 4023d65..c5aa2d0 100644
--- a/scanner/example_test.go
+++ b/scanner/example_test.go
@@ -15,7 +15,8 @@
func ExampleScanner_Scan() {
// src is the input that we want to tokenize.
- src := []byte("cos(x) + 1i*sin(x) // Euler")
+ src := []byte(`[profile "A"]
+color = blue ; Comment`)
// Initialize the scanner.
var s scanner.Scanner
@@ -33,17 +34,13 @@
}
// output:
- // 1:1 IDENT "cos"
- // 1:4 ( ""
- // 1:5 IDENT "x"
- // 1:6 ) ""
- // 1:8 + ""
- // 1:10 IMAG "1i"
- // 1:12 * ""
- // 1:13 IDENT "sin"
- // 1:16 ( ""
- // 1:17 IDENT "x"
- // 1:18 ) ""
- // 1:20 ; "\n"
- // 1:20 COMMENT "// Euler"
+ // 1:1 [ ""
+ // 1:2 IDENT "profile"
+ // 1:10 STRING "\"A\""
+ // 1:13 ] ""
+ // 1:14 EOL ""
+ // 2:1 IDENT "color"
+ // 2:7 = ""
+ // 2:9 STRING "blue"
+ // 2:14 COMMENT "; Comment"
}