diff options
author | Robert Griesemer <gri@golang.org> | 2009-07-14 10:44:57 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-07-14 10:44:57 -0700 |
commit | b5318dcac20f5c1302975995b35f9883cf173cb0 (patch) | |
tree | 958b37c128124281cf2faae1191a55e15db02124 /src/pkg/go/token/token.go | |
parent | af68bb2b309c186a519201f4c3bbcc339fdd064a (diff) | |
download | golang-b5318dcac20f5c1302975995b35f9883cf173cb0.tar.gz |
- added Filename field to token.Position
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
to errors.go
- added extra tests
R=rsc
DELTA=385 (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601
Diffstat (limited to 'src/pkg/go/token/token.go')
-rw-r--r-- | src/pkg/go/token/token.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/go/token/token.go b/src/pkg/go/token/token.go index a70a75a54..3197b6637 100644 --- a/src/pkg/go/token/token.go +++ b/src/pkg/go/token/token.go @@ -327,6 +327,7 @@ func (tok Token) IsKeyword() bool { // A Position is valid if the line number is > 0. // type Position struct { + Filename string; // filename, if any Offset int; // byte offset, starting at 0 Line int; // line number, starting at 1 Column int; // column number, starting at 1 (character count) |