1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
17 // This is scanned code.
22 s
.Init(strings
.NewReader(src
))
24 for tok
!= scanner
.EOF
{
26 fmt
.Println("At position", s
.Pos(), ":", s
.TokenText())
30 // At position 3:4 : if
31 // At position 3:6 : a
32 // At position 3:8 : >
33 // At position 3:11 : 10
34 // At position 3:13 : {
35 // At position 4:15 : someParsable
36 // At position 4:17 : =
37 // At position 4:22 : text
38 // At position 5:3 : }