summaryrefslogtreecommitdiff
path: root/src/pkg/go
AgeCommit message (Collapse)AuthorFilesLines
2009-10-22minor changes to walkRobert Griesemer1-59/+52
R=rsc http://go/go-review/1012008
2009-10-22simple AST walking supportRobert Griesemer2-0/+310
R=rsc http://go/go-review/1014006
2009-10-22go/printer:Robert Griesemer2-57/+83
- handle HTML tagging via (client-installable) Stylers go/doc: - basic styler support - some factoring - ready to contain the search code (but for now excluded) doc/style.css: - updated doc/go_spec.css: - cleanup: replace deprecated uses of <font> tag with <span> tag R=rsc DELTA=302 (160 added, 62 deleted, 80 changed) OCL=35973 CL=35996
2009-10-19support one-line functionsRobert Griesemer6-43/+161
R=rsc DELTA=207 (160 added, 42 deleted, 5 changed) OCL=35854 CL=35887
2009-10-15improved handling of expression listsRobert Griesemer7-70/+179
R=rsc DELTA=189 (118 added, 9 deleted, 62 changed) OCL=35816 CL=35821
2009-10-15close file after useRobert Griesemer1-0/+1
R=rsc DELTA=1 (1 added, 0 deleted, 0 changed) OCL=35778 CL=35780
2009-10-15- bug fix: must not insert indentation tabs into multi-line strings in RawFormatRobert Griesemer3-29/+221
(always write tabwriter.Escape chars so formatting is driven correctly; but strip them again in the end if no tabwriter is used) - added testcase for RawFormat printing R=rsc DELTA=227 (198 added, 6 deleted, 23 changed) OCL=35772 CL=35774
2009-10-15bug fix: do not modify (string) literals in any way even if theyRobert Griesemer3-38/+45
contain tabs or line breaks R=rsc DELTA=57 (19 added, 12 deleted, 26 changed) OCL=35749 CL=35770
2009-10-15Work-around for factory function heuristic failure:Robert Griesemer1-9/+27
only associate a couple of functions as factories for os.Error. Replaces CL 35628 (abandoned). R=rsc DELTA=35 (26 added, 0 deleted, 9 changed) OCL=35754 CL=35768
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-12bug fix: convert \v's into \t's if there's no tabwriterRobert Griesemer1-3/+13
R=rsc DELTA=15 (12 added, 2 deleted, 1 changed) OCL=35641 CL=35645
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