]> Cypherpunks repositories - gostls13.git/commitdiff
- fixed old test cases with wrong syntax
authorRobert Griesemer <gri@golang.org>
Fri, 19 Sep 2008 06:09:07 +0000 (23:09 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Sep 2008 06:09:07 +0000 (23:09 -0700)
- added more test cases to Makefile
- fixed another parser issue (possibly a 6g bug - to be tracked down)

R=r
OCL=15516
CL=15516

usr/gri/gosrc/base.go
usr/gri/gosrc/decls.go
usr/gri/pretty/Makefile
usr/gri/pretty/parser.go

index 456f354f4252ecd0c729206c94380ef3ae950212..7a3e5ebdec00c110c29189416ae011184c105c43 100755 (executable)
@@ -14,11 +14,10 @@ export type Node struct {
   left, right *Node;
   val bool;
   f Foo;
-  const, type, var, package int;
 }
 
-export func (p *Node) case(x int) {};
+export func (p *Node) F(x int) {};
 
 export type I interface {
-  func();
+  f();
 }
index 1e7d3561a124199fd7d93c4e2e95eea5c4362eb0..b923fd1b8fe9a9fd26ea67d94f313d2800af2ea4 100755 (executable)
@@ -46,15 +46,6 @@ type F5 (a, b int, c float) (z T5, ok bool)
 type F6 (a int, b float) bool
 type F7 (a int, b float, c, d *bool) bool
 
-export type M0 (p T5) . ();
-type (
-       M1 (p T5) . (a int);
-       M2 (p T5) . (a, b int, c float);
-       M3 (p T5) . () bool;
-       M4 (p T5) . (a int) (z T5, ok bool);
-)
-export type M5 (p T5) . (a, b int, c float) (z T5, ok bool);
-
 type T6 chan int
 type T7 <- chan *T6
 type T8 chan <- *T6
index 81ca81286fe7dfffdc44b25a4bc0473c5512f8c4..a6e355672e5350e5cea23472e4a06a2919813866 100644 (file)
@@ -10,8 +10,10 @@ pretty: pretty.6
 
 test: pretty
        pretty *.go
-       pretty $(GOROOT)/test/fixedbugs/*.go  # some files legally don't compile
+       pretty ../gosrc/*.go
        pretty $(GOROOT)/test/sieve.go
+       pretty $(GOROOT)/test/bugs/*.go  # some files legally don't compile
+       pretty $(GOROOT)/test/fixedbugs/*.go  # some files legally don't compile
        pretty $(GOROOT)/src/pkg/*.go
        pretty $(GOROOT)/src/lib/flag.go
        pretty $(GOROOT)/src/lib/fmt.go
@@ -19,7 +21,7 @@ test: pretty
        pretty $(GOROOT)/src/lib/math/*.go
        pretty $(GOROOT)/src/lib/container/*.go
        pretty $(GOROOT)/src/syscall/*.go
-       echo "PASSED"
+       echo "DONE"
 
 install: pretty
        cp pretty $(HOME)/bin/pretty
index 130030365ce49926a4e45950398badda4fee00eb..d1a0b6230501696bc23d1e9cfdde8cad74fdf2ba 100644 (file)
@@ -453,7 +453,7 @@ func (P *Parser) TryType() bool {
        case Scanner.LBRACK: P.ParseArrayType();
        case Scanner.CHAN, Scanner.ARROW: P.ParseChannelType();
        case Scanner.INTERFACE: P.ParseInterfaceType();
-       case Scanner.LPAREN: P.ParseFunctionType();
+       case Scanner.LPAREN: P.ParseSignature();
        case Scanner.MAP: P.ParseMapType();
        case Scanner.STRUCT: P.ParseStructType();
        case Scanner.MUL: P.ParsePointerType();