diff options
Diffstat (limited to 'usr/gri/pretty/ast.go')
-rw-r--r-- | usr/gri/pretty/ast.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/usr/gri/pretty/ast.go b/usr/gri/pretty/ast.go new file mode 100644 index 000000000..311b91f51 --- /dev/null +++ b/usr/gri/pretty/ast.go @@ -0,0 +1,39 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package AST; + + +export type Expr interface { + pos() int; + print(); +} + + +export type Stat interface { + pos() int; + print(); +} + + +// --------------------------------------------------------------------- +// Concrete nodes + +export type Ident struct { + pos_ int; + val_ string; +} + + +func (p *Ident) pos() int { + return p.pos_; +} + + +func (p *Ident) print() { + print("x"); // TODO fix this +} + + +// TODO: complete this |