1
0
mirror of https://github.com/golang/go synced 2024-11-25 15:47:56 -07:00

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

- adjusted makefiles

SVN=126763
This commit is contained in:
Robert Griesemer 2008-07-10 18:05:00 -07:00
parent 72772282cd
commit afbf717eeb
8 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package Globals;
package Globals
// The following types should really be in their respective files
@ -49,6 +49,7 @@ type Scope struct {
}
/*
func (scope *Scope) Lookup(ident string) *Object {
panic "UNIMPLEMENTED";
return nil;
@ -64,3 +65,4 @@ func (scope *Scope) InsertImport(obj *Object) *Object {
panic "UNIMPLEMENTED";
return nil;
}
*/

View File

@ -1046,10 +1046,13 @@ func (P *Parser) ParseProgram() {
P.Trace("Program");
P.Expect(Scanner.PACKAGE);
P.ParseIdent();
P.Optional(Scanner.SEMICOLON);
for P.tok == Scanner.IMPORT {
P.ParseImportDecl();
P.Optional(Scanner.SEMICOLON);
}
for P.tok != Scanner.EOF {
P.ParseDeclaration();
P.Optional(Scanner.SEMICOLON);