summaryrefslogtreecommitdiff
path: root/src/pkg/go/scanner
AgeCommit message (Collapse)AuthorFilesLines
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-3/+3
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý2-37/+49
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-5/+6
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý2-23/+30
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý3-379/+455
2010-06-09go/scanner: report illegal escape sequencesRobert Griesemer1-20/+29
R=golang-dev, r CC=golang-dev http://codereview.appspot.com/1636043
2010-03-16gofmt: more consistent formatting of const/var declsRobert Griesemer2-4/+4
- gofmt -w src misc - only manually modified file: src/pkg/go/printer/nodes.go R=rsc CC=golang-dev, r http://codereview.appspot.com/606041
2010-02-26go/scanner: the position of '\n's chars must be the last position of the ↵Robert Griesemer2-8/+12
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-25use []byte("abc") in place of []byte{'a', 'b', 'c'}Russ Cox1-1/+1
R=gri CC=golang-dev http://codereview.appspot.com/223059
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 Griesemer2-1/+19
R=rsc CC=golang-dev http://codereview.appspot.com/223044
2010-02-16go/scanner: comply with spec changes (do not allow NUL chars)Robert Griesemer2-16/+24
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 Griesemer2-23/+95
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 Griesemer2-2/+8
Fixes issue 433. R=rsc CC=golang-dev http://codereview.appspot.com/179072
2009-12-151) Change default gofmt default settings forRobert Griesemer3-279/+279
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 Griesemer2-45/+72
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 Griesemer2-20/+236
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 Griesemer2-14/+6
- 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-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-2/+2
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer2-13/+13
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 Griesemer3-98/+98
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer2-13/+7
- 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-11-04gofmt-ify src/pkg/go (excluding printer directory due to pending CL,Robert Griesemer1-2/+2
and parser.go and scanner_test.go which have minor formatting issues) R=rsc http://go/go-review/1016042
2009-10-13reduce stutter: sort.SortInterface -> sort.Interface.Rob Pike1-1/+1
ditto for heap.HeapInterface R=gri,rsc DELTA=31 (0 added, 1 deleted, 30 changed) OCL=35665 CL=35673
2009-10-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox2-78/+115
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420
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-26change IsDecimalDigit to IsDigit because Decimal is redundantRob Pike1-1/+1
R=rsc DELTA=792 (398 added, 383 deleted, 11 changed) OCL=33919 CL=33921
2009-08-12convert non-low-level non-google pkg codeRuss Cox3-71/+12
to whole-package compilation. R=r OCL=33070 CL=33101
2009-07-30String method for token.Position. Extracted from gri's tree.Austin Clements1-10/+5
R=gri APPROVED=gri DELTA=33 (20 added, 6 deleted, 7 changed) OCL=32544 CL=32546
2009-07-17Produce friendlier errors messages for malformed characterAustin Clements1-7/+21
literals and when the parser hits an unexpected EOF. Also, disallow newlines in character literals. R=gri APPROVED=gri DELTA=23 (15 added, 1 deleted, 7 changed) OCL=31790 CL=31797
2009-07-14- added Filename field to token.PositionRobert Griesemer4-40/+365
- 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-07-09Show BUG comments in godoc:Robert Griesemer1-1/+2
ast.go: - rename Comments -> CommentGroup (less confusion) - change all comments/docs to be *CommentGroup filter.go: - do not remove unassociated comments from program as part of export filtering (they are needed by doc.go for BUG comments) scanner.go: - exclude '\n' from //-style comments parser.go: - rewrote collection of comments: now all collected comments are *ast.CommentGroups - clarified distinction between leading and trailing comments - fixed a bug in comment collection (parseGenDecl); corresponding test case is in printer/testdata - extra documentation doc.go: - collect BUG comments - corresponding fix for parser bug in comment collection comment.go: - simplified regex printer.go: - adjust comment printing to new representation printer_test.go, testdata/*: - enable printing of doc comments - extended tests package.html, package.txt: - added Bugs section gofmt: - enable printing of doc comments R=rsc DELTA=339 (126 added, 38 deleted, 175 changed) OCL=31403 CL=31416
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 Griesemer2-1/+3
R=rsc DELTA=3 (2 added, 0 deleted, 1 changed) OCL=30511 CL=30513
2009-06-09mv src/lib to src/pkgRob Pike3-0/+837
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102