1
0
mirror of https://github.com/golang/go synced 2024-10-01 16:28:33 -06:00
go/usr/gri/gosrc/ast.go

47 lines
712 B
Go
Raw Normal View History

// 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
import Globals "globals"
import Universe "universe"
// ----------------------------------------------------------------------------
// Expressions
export Expr
type Expr interface {
}
export BinaryExpr
type BinaryExpr struct {
typ *Globals.Type;
op int;
x, y Expr;
}
// ----------------------------------------------------------------------------
// Statements
export Stat
type Stat interface {
}
export Block
type Block struct {
// TODO fill in
}
export IfStat
type IfStat struct {
cond Expr;
then_ Stat;
else_ Stat;
}