1
0
mirror of https://github.com/golang/go synced 2024-10-03 18:11:22 -06:00
Commit Graph

36 Commits

Author SHA1 Message Date
Robert Griesemer
8f628f4955 daily snapshot:
- adjustments to match new ast/parser interface
- removed printer.go; functionality now in astprinter.go and docprinter.go
  (more cleanups pending)
- enabled new doc printing in gds
  (lots of fine tuning missing, but pieces falling into place; e.g. methods
  associated with types. Consts, Vars, to come. Collection of all files
  belonging to a package to come)

R=r
OCL=26970
CL=26972
2009-03-31 16:53:58 -07:00
Robert Griesemer
3f42f44227 - incorporation of suggestions by rsc
R=rsc
OCL=26959
CL=26959
2009-03-31 13:28:01 -07:00
Robert Griesemer
75a5d6cd2d Significant parser cleanup:
- commented public interface
- much better and very precise error messages
- much better tracing output
- many more checks (still permits more than just syntactically legal
  programs, but much more is checked that can be checked w/o semantic information)
- updated with respect to updated AST
- general cleanup throughout

Parser almost ready for move into lib/go.

R=r
OCL=26853
CL=26855
2009-03-27 19:27:09 -07:00
Robert Griesemer
34050ca8de - adjustments to match slightly changed scanner interface
- more comments on parser, various cleanups

TBR=r
OCL=26813
CL=26813
2009-03-26 22:16:06 -07:00
Robert Griesemer
eeddc8e73b - adjustments to match new token/scanner/ast
R=r
OCL=26794
CL=26794
2009-03-26 16:10:07 -07:00
Robert Griesemer
808341dd6e - completed AST cleanup
- implemented support for type switches

R=r
OCL=26608
CL=26608
2009-03-20 17:18:48 -07:00
Robert Griesemer
ec77e75e5d daily snapshot:
- various parser fixes to match updated spec (&&, &^=, label decls, const decls)
- using html template for directory and error page in doc server
- show compile errors inplace in the source
- cleanups

R=rsc
OCL=26287
CL=26287
2009-03-13 16:59:51 -07:00
Robert Griesemer
e06a654ce1 daily snapshot:
- correctly associate comments with declarations
  (available through AST)
- very raw printing of interface
- much more functionality, now needs some formatting, sorting, etc.

R=r
OCL=26213
CL=26213
2009-03-12 17:24:03 -07:00
Robert Griesemer
40e204b9eb - update pretty sources to match new scanner interface
R=r
OCL=26129
CL=26131
2009-03-11 12:52:11 -07:00
Russ Cox
7a706fb3d7 Rename os.FD to os.File.
Make Fstat, Readdirnames, and Readdir methods
on os.File.

R=r
DELTA=281  (79 added, 3 deleted, 199 changed)
OCL=25891
CL=26130
2009-03-11 12:51:10 -07:00
Robert Griesemer
47ba59ddb0 - adjustments due to changed tabwriter interface
- more comments in parser

R=r
OCL=26060
CL=26060
2009-03-10 16:31:19 -07:00
Robert Griesemer
83af3229db Lots of cleanups in prep. for checking in parser and ast into lib:
- removed any symbol table stuff
- some interface cleanup
- removed lot's of dead wood
- half the support for type switches (simple form)
- name capitalization
Several rounds to come.

R=r
OCL=25797
CL=25797
2009-03-05 17:15:36 -08:00
Robert Griesemer
63b332eddd - allow ()'s and {}'s for now when parsing calls/composite literals
- require ()'s around composite literals at the if/for/switch control clause level
- fixed a nasty bug: passing a value instead of a pointer to a value to an interface
  variable - and not noticing that the value is copied

R=r
OCL=25649
CL=25649
2009-03-03 16:00:06 -08:00
Robert Griesemer
d169268a1a scanner cleanup - getting it ready to as a library
- removed unneeded code that accumulated over time
- change src from string to []byte (perhaps should be io.Read
but that has some other disadvantages)
- simplified interface

R=r
OCL=25615
CL=25615
2009-03-02 20:27:09 -08:00
Robert Griesemer
3689e221e8 Steps towards a general scanner/parser library for Go:
- converted more of AST and parser to use interfaces and explicit
structs for individual Go constructs (can be replaced now with
interface calls such that the parser becomes AST structure
independent, as suggested by rsc)
- added more tests (find all .go files under GOROOT)
- (temporarily) lost html links for identifiers when generating
html output
- TODO: lots of cleanups

R=r
OCL=25518
CL=25518
2009-02-27 15:40:17 -08:00
Robert Griesemer
127526649f - vector package (identical to array except for names)
- updated some file (but not all - left array package in place for now)

R=rsc
DELTA=530  (483 added, 0 deleted, 47 changed)
OCL=25025
CL=25025
2009-02-13 15:07:56 -08:00
Robert Griesemer
9acd2a9731 snapshot:
- first stab at a Go Documentation Server (gds)
- various fixes to make initial version of gds work

R=r
OCL=24588
CL=24588
2009-02-06 15:26:30 -08:00
Robert Griesemer
187cf78a7c - preparation for setting up types
- moved Object, Type, Scope  out of AST into symboltable
  - moved universe into symboltable
  - removed dead code
- fixed dependency computation (pretty -d filename.go)
- lots of cleanups
- removed tocken channel connection between parser and scanner
  (was cute, but not really needed)

R=r
OCL=24545
CL=24545
2009-02-06 11:10:25 -08:00
Robert Griesemer
c048ee21ad - converted expr representation of ast into a new representation
using interfaces properly => much cleaner code
- converted tracing code to use 'defer' statement
- next steps: convert rest of ast as well

R=r
OCL=24277
CL=24277
2009-02-03 17:44:01 -08:00
Robert Griesemer
96c20204a7 - updated pretty (removed "export")
R=r
OCL=23134
CL=23134
2009-01-20 15:22:33 -08:00
Russ Cox
839a68469b delete export
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Robert Griesemer
626d25065d casify struct fields
R=r
OCL=22998
CL=22998
2009-01-16 15:31:34 -08:00
Russ Cox
360962420c casify, cleanup sys
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Robert Griesemer
2527bba993 casify pretty
R=r
OCL=22899
CL=22899
2009-01-15 17:16:41 -08:00
Robert Griesemer
aa1264472e - added mechanism to detect capitalization issues
Use: pretty -naming files

R=r
OCL=22859
CL=22859
2009-01-15 14:19:35 -08:00
Robert Griesemer
a0c709bef8 - use new letter definition for pretty
- fixed a bug with error column reporting in the presence of utf-8 chars
- fixed an assertion failure

R=r
OCL=22762
CL=22762
2009-01-14 15:19:34 -08:00
Robert Griesemer
cb13c4d552 - more steps towards tracking idents in scopes
- snapshot of today

R=r
OCL=22247
CL=22247
2009-01-07 16:54:03 -08:00
Robert Griesemer
9662e7b2db - adjusted pretty to use old new, make
R=r
OCL=22160
CL=22160
2009-01-06 15:01:04 -08:00
Robert Griesemer
215eb7eb7f - steps towards augmenting ast with declaration info
(will help produce html output where we can click on identifiers and
  get to the declaration)
- snapshot before changing back to old new

R=r
OCL=22159
CL=22159
2009-01-06 14:54:18 -08:00
Russ Cox
08ca30bbfa change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.

TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Robert Griesemer
b86359073e Snapshot.
Preparations to track identifiers and declarations so that we can
generate good html links as pretty printer output:
- brought over old code and adjusted it
- initial hookups, nothing really running yet

R=r
OCL=21383
CL=21383
2008-12-16 18:02:22 -08:00
Robert Griesemer
732b53a1fe - snapshot of state before trying yet another, hopefully better working
way to integrate comments into the generated output
- various simplificatins and cleanups throughout

R=r
OCL=20062
CL=20062
2008-11-26 13:23:26 -08:00
Robert Griesemer
b1297aa04f - move error handling out of scanner
- use more of the existing library code

R=r
OCL=19957
CL=19959
2008-11-24 18:24:21 -08:00
Robert Griesemer
fcdcf33a71 - array-ify code, remove local implementation
R=r
OCL=19648
CL=19651
2008-11-19 16:49:50 -08:00
Robert Griesemer
eba73552d2 - added simple facility to print Makefile dependency rules given a Go source file
(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
2008-10-26 21:32:30 -07:00
Robert Griesemer
63ed2b710b - missing file
R=r
OCL=17813
CL=17813
2008-10-24 14:08:01 -07:00