1. 22 Oct, 2009 1 commit
    • Robert Griesemer's avatar
      go/printer: · 90cc4a59
      Robert Griesemer authored
      - 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
      90cc4a59
  2. 20 Oct, 2009 2 commits
    • Robert Griesemer's avatar
      remove superfluous tracing support · f591591a
      Robert Griesemer authored
      R=rsc
      DELTA=5  (0 added, 4 deleted, 1 changed)
      OCL=35930
      CL=35930
      f591591a
    • Robert Griesemer's avatar
      Updated and simplified gofmt. · 4213c223
      Robert Griesemer authored
      - operates on stdin, a single file, or all files in a file tree
      - setting -w flag writes to (source) file instead of stdout
      - setting -l flag lists files whose formatting has changed
      
      R=rsc
      DELTA=201  (102 added, 71 deleted, 28 changed)
      OCL=35890
      CL=35926
      4213c223
  3. 06 Oct, 2009 1 commit
  4. 17 Sep, 2009 1 commit
  5. 11 Sep, 2009 1 commit
    • Robert Griesemer's avatar
      better gofmt formatting: · 58c5e62f
      Robert Griesemer authored
      - 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
      58c5e62f
  6. 07 Aug, 2009 1 commit
  7. 01 Aug, 2009 1 commit
    • Robert Griesemer's avatar
      printer: · 62718fb5
      Robert Griesemer authored
      - prepare for generation of HTML id tags and links
      - do HTML-escaping in central print routine
      - move tabwriter setup into printer
      - fixed various TODOs
      
      godoc:
      - removed tabwriter setup, need for various HTML-escaping
      
      R=rsc
      DELTA=210  (107 added, 36 deleted, 67 changed)
      OCL=32612
      CL=32616
      62718fb5
  8. 31 Jul, 2009 1 commit
    • Robert Griesemer's avatar
      go/ast/filter.go: · 90e6656c
      Robert Griesemer authored
      - more orthogonal functionality of filter functions for better re-use
      
      go/doc/doc.go:
      - simplified interface
      - collect filenames of packages so that they can be shown
      
      godoc:
      - removed TODO, show list of package (linked) files used to create documentation
      
      R=rsc
      DELTA=130  (68 added, 24 deleted, 38 changed)
      OCL=32549
      CL=32552
      90e6656c
  9. 30 Jul, 2009 1 commit
    • Robert Griesemer's avatar
      parser: · 312bd7a1
      Robert Griesemer authored
      - Changed filter function for parser.ParsePackage to
        take an *os.Dir instead of a filename for more
        powerful filters
      
      - Removed TODO in ast.PackageInterface: Now collect
        package comments from all package files
      
      - Cleanups in godoc: Use the new ParsePackage and
        PackageInterface functions; as a result computing
        package information is much simpler now.
      
      R=rsc
      DELTA=285  (80 added, 110 deleted, 95 changed)
      OCL=32473
      CL=32486
      312bd7a1
  10. 28 Jul, 2009 1 commit
    • Robert Griesemer's avatar
      Intersperse comments nicely when printing an AST. · 2210a643
      Robert Griesemer authored
      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
      2210a643
  11. 17 Jul, 2009 1 commit
    • Robert Griesemer's avatar
      ast: · f3ffd93a
      Robert Griesemer authored
      - renamed Program -> SourceFile
      - added Package node representing the AST for an entire package
      - added filter function to create a source file mimicking the
        interface of an entire package
      
      parser:
      - parser entry to parse entire packages
      - unified naming of parser entry points
      - factored out entry points into new file (interface.go)
      
      gofmt:
      - extended to accept single .go files, and package paths:
        gofmt file.go	     	    // formatting of a single file
        gofmt -x file.go	    // interface of a single file
        gofmt -x ./MyPackage	    // interface of a local package
        gofmt -x math		    // interface of a $GOROOT relative package
      
      Various adjustments in dependent files, documentation.
      
      R=rsc
      DELTA=634  (369 added, 153 deleted, 112 changed)
      OCL=31743
      CL=31748
      f3ffd93a
  12. 14 Jul, 2009 1 commit
  13. 10 Jul, 2009 1 commit
  14. 09 Jul, 2009 1 commit
    • Robert Griesemer's avatar
      Show BUG comments in godoc: · 38e7fddc
      Robert Griesemer authored
      ast.go:
      - rename Comments -> CommentGroup (less confusion)
      - change all comments/docs to be *CommentGroup
      
      filter.go:
      - do not remove unassociated comments from program as part
        of export filtering (they are needed by doc.go for BUG comments)
      
      scanner.go:
      - exclude '\n' from //-style comments
      
      parser.go:
      - rewrote collection of comments: now all collected comments
        are *ast.CommentGroups
      - clarified distinction between leading and trailing comments
      - fixed a bug in comment collection (parseGenDecl);
        corresponding test case is in printer/testdata
      - extra documentation
      
      doc.go:
      - collect BUG comments
      - corresponding fix for parser bug in comment collection
      
      comment.go:
      - simplified regex
      
      printer.go:
      - adjust comment printing to new representation
      
      printer_test.go, testdata/*:
      - enable printing of doc comments
      - extended tests
      
      package.html, package.txt:
      - added Bugs section
      
      gofmt:
      - enable printing of doc comments
      
      R=rsc
      DELTA=339  (126 added, 38 deleted, 175 changed)
      OCL=31403
      CL=31416
      38e7fddc
  15. 06 Jul, 2009 1 commit
  16. 16 Jun, 2009 1 commit
  17. 15 Jun, 2009 1 commit
    • Robert Griesemer's avatar
      gofmt (final resting place TBD): · a893db87
      Robert Griesemer authored
      - replacement for pretty; app to format a single .go file
      
      printer.go (pkg/go/printer):
      - replacement for astprinter.go; implements AST printing
      - also replaces pkg/go/ast/format.go for now
      
      cleanups:
      - removed/saved away old code
      
      R=r,rsc,iant
      DELTA=2833  (1183 added, 1628 deleted, 22 changed)
      OCL=30226
      CL=30306
      a893db87