- fixed html tag generation
- simplified html escaping machinery
(not 100% correct for strings yet)
- can now produce the first mostly correct formatted html pages from source
with (fake) links: e.g. pretty -html srcfile.go > srcfile.html
R=r
OCL=20915
CL=20915
mark and sweep, stop the world garbage collector
(intermediate step in the way to ref counting).
can run pretty with an explicit gc after each file.
R=r
DELTA=502 (346 added, 143 deleted, 13 changed)
OCL=20630
CL=20635
can run peano 10 in 100 MB (instead of 1+ GB) of memory
when linking against this.
can run peano 11 in 1 GB of memory now.
R=r
DELTA=100 (44 added, 44 deleted, 12 changed)
OCL=20504
CL=20553
- first cut at html writer (will do html escaping, html tag production)
- first cut at generating basic html output via pretty
- some cleanups
R=r
OCL=20550
CL=20550
- 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