mirror of
https://github.com/golang/go
synced 2024-11-23 00:10:07 -07:00
9761a6d069
(first step towards cleaner package handling) - check that map, function, and channel vars are pointers R=r OCL=13690 CL=13690
43 lines
733 B
Go
43 lines
733 B
Go
// 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 BinaryExpr
|
|
type BinaryExpr struct {
|
|
typ_ *Globals.Type;
|
|
op int;
|
|
x, y Globals.Expr;
|
|
}
|
|
|
|
|
|
|
|
func (x *BinaryExpr) typ() *Globals.Type {
|
|
return x.typ_;
|
|
}
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// Statements
|
|
|
|
export Block
|
|
type Block struct {
|
|
// TODO fill in
|
|
}
|
|
|
|
|
|
export IfStat
|
|
type IfStat struct {
|
|
cond Globals.Expr;
|
|
then_ Globals.Stat;
|
|
else_ Globals.Stat;
|
|
}
|