1
0
mirror of https://github.com/golang/go synced 2024-10-03 12:21:22 -06:00
go/usr/gri/pretty/ast.txt
Robert Griesemer 3aa892c4f9 daily snapshot:
- more work on template-driven ast printing

R=r
OCL=27851
CL=27851
2009-04-24 17:22:58 -07:00

40 lines
394 B
Plaintext

//string =
// "%s" ;
pointer =
^ ;
array =
^ ;
//token.Token =
// "token<%d>" ; // this should be a Go-installed formatter
ast
;
Comments =
"comments\n" ;
Ident =
Value ;
Program =
"package " Name "\n\n" { Decls "\n\n" } ;
GenDecl =
Doc
Tok " (\n"
")\n";
FuncType =
"(" { Params } ")" ;
BlockStmt =
"{\n" "}\n" ;
FuncDecl =
"func " Name Type [ " " Body ] ;
Decl =
^ ;