1
0
mirror of https://github.com/golang/go synced 2024-11-12 06:20:22 -07:00
The Go programming language
Go to file
Robert Griesemer 2210a643b7 Intersperse comments nicely when printing an AST.
gofmt formatted source code looks pretty good already;
with a bit more fine-tuning it should be great.

printer.go:
- Implemented comment intersperse algorithm.
  The approach is a result of many trial-and-error
  experiments but at this point reasonably simple
  and open to arbitrary fine-tuning.

parser.go:
- Simplified handling of lead and line comments
  (formerly called leading and trailing comments).
- Use a comments list instead of an array (I may
  change this back - this is not obviously better
  and uses more space).

doc.go:
- Remove comments from AST nodes that have been
  'consumed' in the documentation to avoid duplicate
  printing of them. Allows for better control of
  what is printed w/o use of printing control flags
  (which are hard to use and not fine-grained enough).

Corresponding adjustments to various clients of these
files.

R=rsc
DELTA=478  (275 added, 108 deleted, 95 changed)
OCL=32185
CL=32380
2009-07-28 16:38:59 -07:00
doc - renamed SimpleVarDecl -> ShortVarDecl, in sync with terminology used in prose 2009-07-16 20:31:41 -07:00
include fix gotest by fixing nm -s to print in file order by storing a sequence number 2009-04-15 21:57:55 -07:00
lib/godoc no longer necessary; directory not empty anymore 2009-07-09 16:44:20 -07:00
misc/xcode xcode config files, self-describing 2009-05-20 16:09:34 -07:00
pkg clear out pkg tree in clean.bash. 2009-05-20 11:12:05 -07:00
src Intersperse comments nicely when printing an AST. 2009-07-28 16:38:59 -07:00
test Support use of $GOBINDIR to override $HOME/bin 2009-07-28 11:23:24 -07:00
usr Fix segfault on unnamed function arguments. Make continue 2009-07-28 16:38:41 -07:00