Commit e6cd1e44 authored by Russ Cox's avatar Russ Cox

remove uses of *T as an implicit forward declaration of T

R=gri,r
OCL=16648
CL=16652
parent 96da920f
......@@ -98,6 +98,12 @@ func atob(str string) (value bool, ok bool) {
return false, false
}
type (
BoolValue struct;
IntValue struct;
StringValue struct;
)
// -- Bool Value
type BoolValue struct {
val bool;
......
......@@ -6,6 +6,7 @@
package main
type T struct
type S struct {
p *T // BUG T never declared
}
......
......@@ -6,6 +6,10 @@
package main
type (
Type struct;
Object struct;
)
type Scope struct {
entries *map[string] *Object;
......
......@@ -9,6 +9,12 @@ package main
const nilchar = 0;
type (
Atom struct;
List struct;
Slist struct;
)
type Atom struct {
str string;
integer int;
......
......@@ -13,6 +13,11 @@ package Globals
// ----------------------------------------------------------------------------
type Type struct
type Scope struct
type Elem struct
type Compilation struct
export type Object struct {
exported bool;
pos int; // source position (< 0 if unknown position)
......
......@@ -8,6 +8,49 @@ package AST
// ----------------------------------------------------------------------------
// Visitor
type (
Nil struct;
Ident struct;
ArrayType struct;
StructType struct;
MapType struct;
ChannelType struct;
PointerType struct;
InterfaceType struct;
FunctionType struct;
VarDeclList struct;
ImportDecl struct;
ConstDecl struct;
TypeDecl struct;
VarDecl struct;
Declaration struct;
FuncDecl struct;
MethodDecl struct;
Selector struct;
Index struct;
Call struct;
Pair struct;
Binary struct;
Unary struct;
Literal struct;
CompositeLit struct;
FunctionLit struct;
Label struct;
Block struct;
ExprStat struct;
Assignment struct;
ControlClause struct;
IfStat struct;
ForStat struct;
CaseClause struct;
SwitchStat struct;
ReturnStat struct;
IncDecStat struct;
ControlFlowStat struct;
GoStat struct;
Program struct;
)
export type Visitor interface {
// Basics
DoNil(x *Nil);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment