- by default consider extra newlines in src for better formatting
- additional flags for control (-newlines, -maxnewlines, -optsemicolons)
- don't print ()'s around single anonymous result types
Status: Comparing the output of pretty with the input for larger files
shows mostly whitespace/formatting differences, which is what is desired.
TODO:
- Handling of overlong lines
- some esoteric cases which look funny
R=r
OCL=20293
CL=20293
- changed tab width to 8 chars by default to make test run properly
- excluded 4 files that are not idempotently printed
- fixed a couple of incorrect file position recordings in parser
- fine-tuned layout engine
- white-space formatting reasonable, but not perfect
- no handling of overlong lines
R=r
To use with smaller tabs: pretty -tabwidth=4 file.go
To use with blanks instead of tabs: pretty -usetabs=0 file.go
OCL=20184
CL=20184
- comment printing still disabled by default because idempotency test fails
- whitespace control better but not perfect yet
- snapshot before making some heuristics changes
R=r
OCL=20151
CL=20151
for end of declarations, blocks, parameter lists, etc.
- use extra src positions to more accurately print comments
- fine-tuned low-level printing routine for comments
- added better debugging support
Status:
- comments now appear at the right place (inbetween the right tokens)
- newline control needs improvement (not very hard)
- comment printing disabled for now because pretty is not idempotent
with it; to enable: -comments
R=r
OCL=20079
CL=20079
(to be moved into std lib eventually)
- rewrote tabwriter to use byte buffers instead of strings
(byte buffers to be moved into stdlib eventually)
- support for recent syntax changes
- no space printed after function name and before function parameters
- comments still disabled due to a known bug
R=r
OCL=19430
CL=19430
- implemented elastic tabstops algorithm, now correct and documented
- first cut at printing comments (use -comments flag, disabled for now)
- struct field types are now aligned (using elastic tab stops)
- needs more fine-tuning
* fixed a bug in test script
* added quick smoke test to makefile and invoke it in run.bash
instead of the full test
R=r
OCL=19220
CL=19220
- new code enabled, but no comments printed yet (so the effect
of the elastic tabs is not seen yet)
TBR=r
DELTA=200 (93 added, 69 deleted, 38 changed)
OCL=18951
CL=18951
(operates on 30bit values at a time instead of 20bit values)
- refactored and cleaned up lots of code
- more tests
- close to check-in as complete library
R=r
OCL=18326
CL=18326
(e.g.: pretty -d pretty.go will print the Makefile dep. rules of the involved
Go files that are not part of the installed library)
- minor fix in pretty printer (tested against ken's test files)
R=r
OCL=17872
CL=17872
- fixed an issue with select
- added all bugs and fixedbugs tests that are syntactically correct to the test suite
- minor cosmetic changes
R=r
OCL=17759
CL=17759
Beginnings of values.
typestrings are grabbed from the environment.
R=rsc
APPROVED=rsc
DELTA=1046 (952 added, 3 deleted, 91 changed)
OCL=17593
CL=17621
- added validation test verifying that pretty output compiles with 6g again (disabled at the moment)
- replaced another recursive function with an interative solution
R=r
OCL=17505
CL=17505