Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
3aa892c4
Commit
3aa892c4
authored
Apr 25, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily snapshot:
- more work on template-driven ast printing R=r OCL=27851 CL=27851
parent
b03b541b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
11 deletions
+37
-11
ast.txt
usr/gri/pretty/ast.txt
+37
-11
format.go
usr/gri/pretty/format.go
+0
-0
No files found.
usr/gri/pretty/ast.txt
View file @
3aa892c4
//
TODO prefix decl doesn't work
//
ast .
//
string =
//
"%s" ;
ast.Ident
=
Value .
pointer
=
^ ;
a
st.Program
=
"package " Name "\n" { Decls "\n\n" } .
a
rray
=
^ ;
ast.GenDecl
=
"def " .
//token.Token
=
// "token<%d>" ; // this should be a Go-installed formatter
ast.FuncDecl =
"func " .
\ No newline at end of file
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 =
^ ;
\ No newline at end of file
usr/gri/pretty/format.go
View file @
3aa892c4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment