summaryrefslogtreecommitdiff
path: root/src/pkg/go
AgeCommit message (Collapse)AuthorFilesLines
2009-10-12- improved comment intersperse heuristic:Robert Griesemer11-191/+480
comments should now be indented properly in corner cases (at the end of statement lists, for instance) - changed import decl. formatting as suggested by Russ (no "global" indentation of imports if there are renames present) - better field list handling - better documentation R=rsc DELTA=534 (324 added, 35 deleted, 175 changed) OCL=35557 CL=35630
2009-10-08more lgtm files from gofmtRuss Cox2-73/+89
R=gri OCL=35485 CL=35488
2009-10-08- rewrite declaration printing to take full use of discardable tabwriter columnsRobert Griesemer6-139/+334
- honor line breaks in multi-line expressions - do not add extra indentation to multi-line string lists - don't put blanks around simple function calls and conversions - do not modify `` strings - added extra test cases R=rsc DELTA=398 (246 added, 51 deleted, 101 changed) OCL=35453 CL=35465
2009-10-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox6-338/+406
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420
2009-10-06fix build - missing from 35404Russ Cox1-0/+7
TBR=gri OCL=35411 CL=35411
2009-10-06more comment work.Russ Cox1-50/+21
got rid of regexps. primary bug fix is that // inside /* */ do not get stripped anymore, so that the text inside /* int a; // int b; int c; */ is int a; // int b; int c; before, the "int b;" line was being uncommented too. R=gri DELTA=65 (13 added, 42 deleted, 10 changed) OCL=35334 CL=35404
2009-10-06- simplify "needsBlanks" logic for identifiers and stringsRobert Griesemer3-6/+12
TBR=rsc DELTA=16 (10 added, 4 deleted, 2 changed) OCL=35379 CL=35403
2009-10-06change tabwidth to 8 for testsRobert Griesemer4-39/+39
R=rsc DELTA=39 (0 added, 0 deleted, 39 changed) OCL=35360 CL=35376
2009-10-05various go printer fixes:Robert Griesemer9-33/+394
- better handling of line breaks in expression lists - fixed line breaks around label decls - remove ()'s around if, for, switch expressions - simple index expressions don't require blanks - better line breaks around declarations of different kind R=rsc DELTA=404 (369 added, 8 deleted, 27 changed) OCL=35354 CL=35359
2009-10-05preserve blank lines in // commentsRuss Cox1-18/+19
R=gri DELTA=32 (13 added, 12 deleted, 7 changed) OCL=35317 CL=35332
2009-10-02- improved handling of white space around declarations and statementsRobert Griesemer11-98/+325
- extra tests R=rsc DELTA=366 (264 added, 37 deleted, 65 changed) OCL=35299 CL=35301
2009-10-02- allow parenthesized [...]T types as in: ([...]int){}Robert Griesemer3-18/+55
- added extra tests R=rsc DELTA=55 (37 added, 0 deleted, 18 changed) OCL=35250 CL=35276
2009-09-28permit only one method name per method signature in interface typesRobert Griesemer7-38/+34
(in sync with spec CL 35047) R=rsc DELTA=44 (4 added, 8 deleted, 32 changed) OCL=35048 CL=35054
2009-09-24go/printer: fix sync bug - avoid sending on errors twice -Russ Cox1-1/+4
and report node type in error R=gri DELTA=4 (3 added, 0 deleted, 1 changed) OCL=34949 CL=34955
2009-09-21improved spacing around if, switch, and for control clausesRobert Griesemer4-5/+82
R=r DELTA=89 (82 added, 5 deleted, 2 changed) OCL=34870 CL=34870
2009-09-19- filter trailing whitespaceRobert Griesemer4-26/+95
- removed some unused code R=rsc DELTA=103 (84 added, 15 deleted, 4 changed) OCL=34816 CL=34829
2009-09-17- improved formatting of declarationsRobert Griesemer7-94/+411
- improved formatting of struct and interface types R=rsc DELTA=471 (364 added, 47 deleted, 60 changed) OCL=34747 CL=34751
2009-09-17unused importsRuss Cox7-15/+0
R=r OCL=34731 CL=34731
2009-09-17- don't add "..." anonymous field to structs/interfaces if entries are strippedRobert Griesemer9-68/+270
- don't print any optional semicolons after declarations inside functions - indicate non-exported fields/methods in exported types with a comment so that the "exported source" is legal Go code - more tests R=rsc DELTA=300 (227 added, 25 deleted, 48 changed) OCL=34697 CL=34730
2009-09-16publish doc.CommentTextRuss Cox2-19/+17
R=gri DELTA=29 (10 added, 12 deleted, 7 changed) OCL=34709 CL=34712
2009-09-16make String work on Position values, to enableRuss Cox1-11/+9
fmt.Printf("%s: %s\n", expr.Pos(), message); R=gri DELTA=15 (1 added, 3 deleted, 11 changed) OCL=34706 CL=34708
2009-09-16rename bytes.Buffer.Data() to bytes.Buffer.Bytes()Rob Pike2-3/+3
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
2009-09-15bug fix: allow function types as operandsRobert Griesemer1-4/+9
R=rsc DELTA=10 (5 added, 0 deleted, 5 changed) OCL=34662 CL=34666
2009-09-15consider each case in a switch independent from the previous one for ↵Robert Griesemer1-3/+3
alignment purposes R=rsc DELTA=3 (0 added, 0 deleted, 3 changed) OCL=34654 CL=34656
2009-09-15fix build: added missing filesRobert Griesemer2-0/+56
TBR=rsc DELTA=56 (56 added, 0 deleted, 0 changed) OCL=34652 CL=34652
2009-09-15go/printer:Robert Griesemer12-136/+492
- printing of expressions: put spaces only where "needed" - printing of import statements: no double indentation if there are no renames - print labels on separate lines - added extra test files go/ast: - unified basic literal nodes and as a result deleted duplicated code - added initial code to track scopes (not fully used yet) replaces CL 34553 R=rsc DELTA=881 (579 added, 223 deleted, 79 changed) OCL=34623 CL=34651
2009-09-15more "declared and not used".Russ Cox8-16/+16
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-09-10fix buildRobert Griesemer1-1/+1
TBR=rsc OCL=34550 CL=34552
2009-09-10better gofmt formatting:Robert Griesemer5-116/+406
- first cut a better line breaks in expr lists - trailing commas and semis printed where we tend to write them - fixed a couple of minor spacing issues (interface{}, chan<-, map[x]y, x: y) - removed some formatting flags from gofmt: no need to change default - removed option to reverse declaration order when printing - excluded files from test that cause trouble with idempotency test for now R=rsc DELTA=497 (364 added, 83 deleted, 50 changed) OCL=34539 CL=34544
2009-09-08documentation edits:Russ Cox1-63/+63
add comments showing Go syntax for each token. move doc comments below hidden begin constants R=gri DELTA=66 (3 added, 3 deleted, 60 changed) OCL=34334 CL=34445
2009-09-03add ParseDeclListRuss Cox2-0/+34
R=austin DELTA=34 (34 added, 0 deleted, 0 changed) OCL=34280 CL=34352
2009-09-03parse expression statements beginning withRuss Cox1-1/+1
arithmetic unary operators + - ^ R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=34338 CL=34350
2009-09-01don't show exported methods of non-exported typesRobert Griesemer1-33/+13
R=rsc DELTA=44 (10 added, 30 deleted, 4 changed) OCL=34195 CL=34200
2009-08-31simplified heuristic for associating const/var decls with typesRobert Griesemer1-21/+15
(per suggestion from rsc) R=rsc DELTA=24 (3 added, 9 deleted, 12 changed) OCL=34121 CL=34130
2009-08-31associate const and var declarations with a type where possibleRobert Griesemer1-18/+82
R=rsc DELTA=105 (87 added, 7 deleted, 11 changed) OCL=34062 CL=34119
2009-08-28- don't associate factory methods to basic types (which have no explicit ↵Robert Griesemer1-12/+61
declarations) - be more robust in the presence of absent type declarations R=rsc DELTA=81 (63 added, 14 deleted, 4 changed) OCL=34033 CL=34036
2009-08-28- collect consts and vars in one listRobert Griesemer1-75/+69
- handle absence of forward-decls correctly (cannot assume a type was declared before it was used) R=rsc DELTA=112 (32 added, 38 deleted, 42 changed) OCL=34008 CL=34027
2009-08-27Cleanups:Robert Griesemer2-159/+80
- remove visitor pattern interface (not used) - added non-exported "branding" methods to enforce node hierarchy R=rsc DELTA=174 (13 added, 92 deleted, 69 changed) OCL=33838 CL=33963
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-14- do not accept forward-declarations for structs and interfaces anymoreRobert Griesemer1-45/+31
R=r DELTA=49 (0 added, 14 deleted, 35 changed) OCL=33272 CL=33272
2009-08-13fix testRob Pike1-4/+0
R=gri DELTA=4 (0 added, 4 deleted, 0 changed) OCL=33202 CL=33204
2009-08-13tests, .proto, .cgoRob Pike3-2/+6
R=rsc DELTA=38 (21 added, 3 deleted, 14 changed) OCL=33193 CL=33200
2009-08-12delete forward type declarationsRuss Cox1-25/+11
R=r DELTA=163 (1 added, 149 deleted, 13 changed) OCL=33106 CL=33111
2009-08-12convert non-low-level non-google pkg codeRuss Cox15-388/+35
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-10remove unnecessary pkg. referencesRuss Cox2-3/+3
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-08-06- allow more general type switch syntaxRobert Griesemer5-36/+146
- support for reverse printing of AST (for compiler testing) - added -reverse flag to gofmt R=rsc DELTA=163 (125 added, 11 deleted, 27 changed) OCL=32808 CL=32853
2009-08-05support []byte (more efficient) as well as string in the interfaces.Rob Pike2-6/+6
change the names; Match is for []byte and MatchString is for string, etc. R=rsc DELTA=195 (155 added, 0 deleted, 40 changed) OCL=32800 CL=32800
2009-08-03printer.go:Robert Griesemer1-27/+72
- emit line tag id's in html mode - support for general html tags - better names for a few identifiers godoc.go: - emit links from exported names to source code (actual placement needs fine-tuning) R=rsc DELTA=108 (68 added, 4 deleted, 36 changed) OCL=32639 CL=32654
2009-07-31fix long-standing bug in doc reader:Robert Griesemer1-7/+22
- replace forward-declared types with complete declaration when it is found R=rsc DELTA=23 (15 added, 0 deleted, 8 changed) OCL=32618 CL=32618