summaryrefslogtreecommitdiff
path: root/src/pkg/go/scanner/scanner.go
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ý1-12/+14
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ý1-13/+15
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-151/+185
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 Griesemer1-2/+2
- 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 Griesemer1-6/+8
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-24go/scanner: support for complex (imaginary) constantsRobert Griesemer1-1/+6
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-0/+5
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-11/+17
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-2/+6
Fixes issue 433. R=rsc CC=golang-dev http://codereview.appspot.com/179072
2009-12-151) Change default gofmt default settings forRobert Griesemer1-171/+171
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-39/+64
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-17/+79
R=rsc http://codereview.appspot.com/175047
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 Griesemer1-12/+12
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-60/+60
R=rsc, r http://go/go-review/1025029
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-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox1-67/+100
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420
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 Cox1-1/+0
to whole-package compilation. R=r OCL=33070 CL=33101
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 Griesemer1-16/+28
- 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-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-18`` strings may span multiple linesRobert Griesemer1-1/+1
R=rsc DELTA=3 (2 added, 0 deleted, 1 changed) OCL=30511 CL=30513
2009-06-09mv src/lib to src/pkgRob Pike1-0/+501
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102