Commit 2b70c6ad authored by Robert Griesemer's avatar Robert Griesemer

- fixed old test cases with wrong syntax

- added more test cases to Makefile
- fixed another parser issue (possibly a 6g bug - to be tracked down)

R=r
OCL=15516
CL=15516
parent a1ee6804
...@@ -14,11 +14,10 @@ export type Node struct { ...@@ -14,11 +14,10 @@ export type Node struct {
left, right *Node; left, right *Node;
val bool; val bool;
f Foo; 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 { export type I interface {
func(); f();
} }
...@@ -46,15 +46,6 @@ type F5 (a, b int, c float) (z T5, ok bool) ...@@ -46,15 +46,6 @@ type F5 (a, b int, c float) (z T5, ok bool)
type F6 (a int, b float) bool type F6 (a int, b float) bool
type F7 (a int, b float, c, d *bool) 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 T6 chan int
type T7 <- chan *T6 type T7 <- chan *T6
type T8 chan <- *T6 type T8 chan <- *T6
......
...@@ -10,8 +10,10 @@ pretty: pretty.6 ...@@ -10,8 +10,10 @@ pretty: pretty.6
test: pretty test: pretty
pretty *.go pretty *.go
pretty $(GOROOT)/test/fixedbugs/*.go # some files legally don't compile pretty ../gosrc/*.go
pretty $(GOROOT)/test/sieve.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/pkg/*.go
pretty $(GOROOT)/src/lib/flag.go pretty $(GOROOT)/src/lib/flag.go
pretty $(GOROOT)/src/lib/fmt.go pretty $(GOROOT)/src/lib/fmt.go
...@@ -19,7 +21,7 @@ test: pretty ...@@ -19,7 +21,7 @@ test: pretty
pretty $(GOROOT)/src/lib/math/*.go pretty $(GOROOT)/src/lib/math/*.go
pretty $(GOROOT)/src/lib/container/*.go pretty $(GOROOT)/src/lib/container/*.go
pretty $(GOROOT)/src/syscall/*.go pretty $(GOROOT)/src/syscall/*.go
echo "PASSED" echo "DONE"
install: pretty install: pretty
cp pretty $(HOME)/bin/pretty cp pretty $(HOME)/bin/pretty
......
...@@ -453,7 +453,7 @@ func (P *Parser) TryType() bool { ...@@ -453,7 +453,7 @@ func (P *Parser) TryType() bool {
case Scanner.LBRACK: P.ParseArrayType(); case Scanner.LBRACK: P.ParseArrayType();
case Scanner.CHAN, Scanner.ARROW: P.ParseChannelType(); case Scanner.CHAN, Scanner.ARROW: P.ParseChannelType();
case Scanner.INTERFACE: P.ParseInterfaceType(); case Scanner.INTERFACE: P.ParseInterfaceType();
case Scanner.LPAREN: P.ParseFunctionType(); case Scanner.LPAREN: P.ParseSignature();
case Scanner.MAP: P.ParseMapType(); case Scanner.MAP: P.ParseMapType();
case Scanner.STRUCT: P.ParseStructType(); case Scanner.STRUCT: P.ParseStructType();
case Scanner.MUL: P.ParsePointerType(); case Scanner.MUL: P.ParsePointerType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment