summaryrefslogtreecommitdiff
path: root/src/pkg/go/ast
AgeCommit message (Collapse)AuthorFilesLines
2015-01-15Imported Upstream version 1.4upstream/1.4Tianon Gravi13-3546/+0
2014-06-19Imported Upstream version 1.3upstream/1.3Michael Stapelberg2-1/+75
2013-12-03Imported Upstream version 1.2upstream/1.2Michael Stapelberg5-61/+128
2013-05-14Imported Upstream version 1.1upstream/1.1Michael Stapelberg3-3/+110
2013-03-04Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304Michael Stapelberg10-41/+566
2012-06-14Imported Upstream version 1.0.2upstream/1.0.2Ondřej Surý2-6/+58
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý9-296/+599
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý8-0/+2418
2011-09-13Imported Upstream version 60Ondřej Surý8-2515/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-1/+1
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý4-84/+150
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý2-3/+3
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý8-260/+443
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý2-4/+2
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý2-10/+20
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý6-372/+1011
2010-04-15go/ast: Update comment to mention imaginary literalsEvan Shaw1-1/+1
R=gri CC=golang-dev http://codereview.appspot.com/846050 Committer: Robert Griesemer <gri@golang.org>
2010-04-15"godoc -src pkg_name" excludes duplicates entriesAndrei Vieru1-9/+15
$ godoc xml | grep Copy\(\) func (c CharData) Copy() CharData func (c Comment) Copy() Comment func (d Directive) Copy() Directive func (p ProcInst) Copy() ProcInst func (e StartElement) Copy() StartElement -------------------------------------------- $ godoc -src xml | grep Copy\(\) func (c CharData) Copy() CharData -------------------------------------------- $ godoc -src xml Copy func (c CharData) Copy() CharData { return CharData(makeCopy(c)) } -------------------------------------------- The command "godoc -src pkg_name" should output the interface of the named package, but it excludes all duplicate entries. Also the command "godoc -src pkg_name method_name" will output the source code only for one method even if there are more of them with the same name in the same package. This patch set fixes this issue. R=gri CC=golang-dev http://codereview.appspot.com/883051 Committer: Robert Griesemer <gri@golang.org>
2010-03-30single argument panicRuss Cox1-1/+1
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev http://codereview.appspot.com/850041
2010-03-29go/ast: generalized ast filteringRobert Griesemer2-26/+129
R=rsc CC=golang-dev http://codereview.appspot.com/788041
2010-03-16gofmt: more consistent formatting of const/var declsRobert Griesemer1-5/+5
- gofmt -w src misc - only manually modified file: src/pkg/go/printer/nodes.go R=rsc CC=golang-dev, r http://codereview.appspot.com/606041
2010-03-16godoc: initial support for showing popup informationRobert Griesemer1-0/+13
for identifiers in Go source code - at the moment just show identifier kind (var, func, etc.) and name (eventually should show declaration, type, etc.) - JavaScript parts by adg R=rsc CC=adg, golang-dev http://codereview.appspot.com/578042
2010-03-11ast/filter.go: missing nil-check causes crashRobert Griesemer1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/461041
2010-03-11godoc: fix formatting of -src outputRobert Griesemer1-9/+99
- go/filter.go: make MergePackageFiles smarter - go/printer.go: handle positions from multiple files R=rsc CC=golang-dev http://codereview.appspot.com/460042
2010-02-25use []byte("abc") in place of []byte{'a', 'b', 'c'}Russ Cox1-1/+1
R=gri CC=golang-dev http://codereview.appspot.com/223059
2010-02-24go/ast: streamline representation of field listsRobert Griesemer3-26/+55
- always include position information about opening/closing parens/braces - replace uses of []*ast.Field with *ast.FieldList Fixes issue 473. R=rsc CC=golang-dev http://codereview.appspot.com/223043
2010-02-19go/ast: use a slice instead of a linked list for the list of commentsRobert Griesemer3-21/+14
(this will simplify some further changes) removed several TODOs R=rsc CC=golang-dev http://codereview.appspot.com/216059
2010-02-19- removed exp/parser (support for old semicolon syntax)Robert Griesemer2-27/+5
- go/ast: removed StringList (not needed anymore) - go/ast: changed import path and field list tag to a single string - updated all dependencies R=rsc CC=golang-dev http://codereview.appspot.com/217056
2010-02-16remove assumption that all files belonging to a package are in the same ↵Robert Griesemer1-2/+1
directory: - adjust ast.Package node and doc.PackageDoc correspondingly - introduce parser.ParseFiles R=rsc CC=golang-dev http://codereview.appspot.com/207087
2010-01-28support for ...T parameters (go/* packages)Robert Griesemer1-1/+2
R=rsc CC=golang-dev http://codereview.appspot.com/194126
2010-01-27More steps towards tracking of identifier scopes.Robert Griesemer2-13/+13
- provide scope to parse functions; if non-nil, parser uses the scope to declare and lookup identifiers - resolve forward references where possible R=rsc CC=golang-dev http://codereview.appspot.com/194098
2010-01-25Scoping snapshot.Robert Griesemer1-1/+1
- separate parsing from declaration - setup of correct scopes R=rsc CC=golang-dev http://codereview.appspot.com/189098
2010-01-15 Steps towards tracking scopes for identifiers.Robert Griesemer3-74/+81
- Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change. R=rsc CC=golang-dev, rog http://codereview.appspot.com/189080
2010-01-04Allow a nil Ident to print without crashing.Roger Peppe2-6/+14
Allow Walk of []Decl R=gri CC=golang-dev, rsc http://codereview.appspot.com/183112 Committer: Robert Griesemer <gri@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer4-504/+504
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-07the AST walker currently provides no way to find out how theRoger Peppe1-54/+55
nodes in the tree are nested with respect to one another. a simple change to the Visitor interface makes it possible to do this (for example to maintain a current node-depth, or a knowledge of the name of the current function). Visit(nil) is called at the end of a node's children; this make possible the channel-based interface below, amongst other possibilities. It is still just as simple to get the original behaviour - just return the same Visitor from Visit. Here are a couple of possible Visitor types. // closure-based type FVisitor func(n interface{}) FVisitor func (f FVisitor) Visit(n interface{}) Visitor { return f(n); } // channel-based type CVisitor chan Visit; type Visit struct { node interface{}; reply chan CVisitor; }; func (v CVisitor) Visit(n interface{}) Visitor { if n == nil { close(v); } else { reply := make(chan CVisitor); v <- Visit{n, reply}; r := <-reply; if r == nil { return nil; } return r; } return nil; } R=gri CC=rsc http://codereview.appspot.com/166047 Committer: Robert Griesemer <gri@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-19Permit omission of hi bound in slices.Robert Griesemer2-2/+14
R=r, rsc http://codereview.appspot.com/157082
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer2-3/+3
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer4-51/+51
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer2-159/+70
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-04gofmt-ify src/pkg/go (excluding printer directory due to pending CL,Robert Griesemer2-73/+122
and parser.go and scanner_test.go which have minor formatting issues) R=rsc http://go/go-review/1016042
2009-11-04- respect source line breaks in grouped declarationsRobert Griesemer1-0/+18
- made ast.Spec nodes implement Node interface - added extra test cases R=rsc http://go/go-review/1016038
2009-11-03Note: This is an exact replica and replacement of CL 1018027Robert Griesemer1-0/+18
(which I uploaded at home and thus can't upload from here). CL 1018027 was reviewed. - added comments to scope.go - commented out some code that is not yet needed (and which showed up prominently in the documentation) R=rsc http://go/go-review/1017017
2009-11-03- don't loose extra line breaks in struct/interface declarationsRobert Griesemer1-0/+8
- start new sections if a field/method declaration spans multiple lines; this avoids tabs from the previous line affecting the next field/method R=rsc http://go/go-review/1017015
2009-10-26- gofmt-ify walk.goRobert Griesemer1-44/+67
- fixed several bugs R=rsc http://go/go-review/1015015
2009-10-22minor changes to walkRobert Griesemer1-59/+52
R=rsc http://go/go-review/1012008
2009-10-22simple AST walking supportRobert Griesemer2-0/+310
R=rsc http://go/go-review/1014006
2009-10-08more lgtm files from gofmtRuss Cox1-2/+2
R=gri OCL=35485 CL=35488
2009-10-06apply gofmt to go, gob, hash, http, image, io, json, logRuss Cox2-244/+275
R=gri DELTA=1359 (138 added, 32 deleted, 1189 changed) OCL=35408 CL=35420