Commit 808341dd authored by Robert Griesemer's avatar Robert Griesemer

- completed AST cleanup

- implemented support for type switches

R=r
OCL=26608
CL=26608
parent 2a5af744
This diff is collapsed.
......@@ -83,7 +83,7 @@ func (h *errorHandler) Error(loc scanner.Location, msg string) {
}
func Compile(src_file string, flags *Flags) (*ast.Program, ErrorList) {
func Compile(src_file string, flags *Flags) (*ast.Package, ErrorList) {
src, ok := Platform.ReadSourceFile(src_file);
if !ok {
print("cannot open ", src_file, "\n");
......
This diff is collapsed.
This diff is collapsed.
......@@ -77,7 +77,7 @@ func (s *state) CheckDeclaration(d *AST.Decl) {
*/
func (s *state) CheckProgram(p *ast.Program) {
func (s *state) CheckProgram(p *ast.Package) {
for i := 0; i < len(p.Decls); i++ {
//s.CheckDeclaration(p.Decls[i].(*AST.Decl));
}
......@@ -86,7 +86,7 @@ func (s *state) CheckProgram(p *ast.Program) {
// ----------------------------------------------------------------------------
func CheckProgram(err scanner.ErrorHandler, p *ast.Program) {
func CheckProgram(err scanner.ErrorHandler, p *ast.Package) {
var s state;
s.Init(err);
s.CheckProgram(p);
......
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