summaryrefslogtreecommitdiff
path: root/src/pkg/go/scanner/scanner_test.go
AgeCommit message (Collapse)AuthorFilesLines
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-25/+35
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-10/+15
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-227/+269
2010-02-26go/scanner: the position of '\n's chars must be the last position of the ↵Robert Griesemer1-2/+4
current line Background: This didn't matter until recently, because '\n' don't appear as token starts in source code and thus the exact position was irrelevant (and set as was easiest in the code). With auto semicolon insertion, a virtual semicolon may be inserted when a '\n' is seen. The position of the semicolon is the position of the '\n'. Without this fix, these semicolons appeared on the next line instead of the line where they were inserted. This affected the association of comments to declarations in the parser. As a result, some lead comments where considered line comments, not collected in the ast, and not shown in godoc pages. (This affected only godoc pages, not gofmt-formatted programs). Fixes issue 592. R=rsc CC=golang-dev http://codereview.appspot.com/224068
2010-02-25go/printer, gofmt: align comments in multi-line expression listsRobert Griesemer1-2/+2
- gofmt -w src misc - improves several lists and fixes minor degradation introduced with the fix for issue 628 - removed some dead code (stringList) R=rsc CC=golang-dev http://codereview.appspot.com/223058
2010-02-25strings: delete Runes, BytesRuss Cox1-9/+8
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-24go/scanner: support for complex (imaginary) constantsRobert Griesemer1-0/+13
R=rsc CC=golang-dev http://codereview.appspot.com/223044
2010-02-16go/scanner: comply with spec changes (do not allow NUL chars)Robert Griesemer1-16/+19
and complain about illegal UTF-8 code sequences R=rsc CC=golang-dev http://codereview.appspot.com/209043
2009-12-18report an error for illegal octal numbers instead of treating them as floatsRobert Griesemer1-12/+78
added more test cases some capitalization cleanups R=rsc CC=golang-dev http://codereview.appspot.com/180085
2009-12-15Fix for scanner bug (introduced with most recent change).Robert Griesemer1-0/+2
Fixes issue 433. R=rsc CC=golang-dev http://codereview.appspot.com/179072
2009-12-151) Change default gofmt default settings forRobert Griesemer1-77/+77
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-15fix TODO: insert semicolons before any sequence of commentsRobert Griesemer1-6/+8
that introduce the newline (important for correct placement of comments with gofmt when parsing new syntax) R=rsc http://codereview.appspot.com/179055
2009-12-10implemented InsertSemis mode for go/scannerRobert Griesemer1-3/+157
R=rsc http://codereview.appspot.com/175047
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-10/+9
R=rsc http://codereview.appspot.com/172041
2009-11-24Change to container/vector interface:Robert Griesemer1-1/+1
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer1-1/+1
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-25/+25
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-1/+3
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt the last outstanding files in src/pkgRobert Griesemer1-154/+155
- added a list of issues to printer/nodes.go R=rsc http://go/go-review/1024002
2009-09-15more "declared and not used".Russ Cox1-3/+3
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox1-1/+0
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-12convert non-low-level non-google pkg codeRuss Cox1-8/+7
to whole-package compilation. R=r OCL=33070 CL=33101
2009-07-14- added Filename field to token.PositionRobert Griesemer1-20/+121
- 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
2009-07-09fix to scanner_test after change to //-style comment tokenRobert Griesemer1-0/+5
R=rsc OCL=31421 CL=31421
2009-06-29io.StringBytes -> strings.BytesRuss Cox1-5/+5
io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872
2009-06-18`` strings may span multiple linesRobert Griesemer1-0/+2
R=rsc DELTA=3 (2 added, 0 deleted, 1 changed) OCL=30511 CL=30513
2009-06-09mv src/lib to src/pkgRob Pike1-0/+276
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102