Commit afbf717e authored by Robert Griesemer's avatar Robert Griesemer

- created new dir (gosrc) for go-based front-end

- adjusted makefiles

SVN=126763
parent 72772282
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package Globals; package Globals
// The following types should really be in their respective files // The following types should really be in their respective files
...@@ -49,6 +49,7 @@ type Scope struct { ...@@ -49,6 +49,7 @@ type Scope struct {
} }
/*
func (scope *Scope) Lookup(ident string) *Object { func (scope *Scope) Lookup(ident string) *Object {
panic "UNIMPLEMENTED"; panic "UNIMPLEMENTED";
return nil; return nil;
...@@ -64,3 +65,4 @@ func (scope *Scope) InsertImport(obj *Object) *Object { ...@@ -64,3 +65,4 @@ func (scope *Scope) InsertImport(obj *Object) *Object {
panic "UNIMPLEMENTED"; panic "UNIMPLEMENTED";
return nil; return nil;
} }
*/
...@@ -1046,10 +1046,13 @@ func (P *Parser) ParseProgram() { ...@@ -1046,10 +1046,13 @@ func (P *Parser) ParseProgram() {
P.Trace("Program"); P.Trace("Program");
P.Expect(Scanner.PACKAGE); P.Expect(Scanner.PACKAGE);
P.ParseIdent(); P.ParseIdent();
P.Optional(Scanner.SEMICOLON);
for P.tok == Scanner.IMPORT { for P.tok == Scanner.IMPORT {
P.ParseImportDecl(); P.ParseImportDecl();
P.Optional(Scanner.SEMICOLON); P.Optional(Scanner.SEMICOLON);
} }
for P.tok != Scanner.EOF { for P.tok != Scanner.EOF {
P.ParseDeclaration(); P.ParseDeclaration();
P.Optional(Scanner.SEMICOLON); P.Optional(Scanner.SEMICOLON);
......
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