From 1975ff8b44108208ba64da1bc762a90a14ba23f5 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 1 May 2008 18:14:17 -0700 Subject: [PATCH] - completed syntax for import declarations - fixed a typo SVN=117439 --- doc/go_lang.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/go_lang.txt b/doc/go_lang.txt index 26ffbb2c03..132824e14e 100644 --- a/doc/go_lang.txt +++ b/doc/go_lang.txt @@ -1512,7 +1512,7 @@ Switch statements Switches provide multi-way execution. - SwitchStat = "switch" [ [ SimpleStat ";" ] "Expression ] "{" { CaseClause } "}" . + SwitchStat = "switch" [ [ SimpleStat ";" ] Expression ] "{" { CaseClause } "}" . CaseClause = CaseList StatementList [ ";" ] [ "fallthrough" [ ";" ] ] . CaseList = Case { Case } . Case = ( "case" ExpressionList | "default" ) ":" . @@ -1686,6 +1686,7 @@ array elements (the values). TODO: is this right? + Break statements ---- @@ -1762,8 +1763,9 @@ Import declarations A program can gain access to exported items from another package through an import declaration: - ImportDecl = "import" [ "." | PackageName ] PackageFileName . - PackageFileName = string_lit . + ImportDecl = "import" ( ImportSpec | "(" ImportSpecList [ ";" ] ")" ) . + ImportSpec = [ "." | PackageName ] PackageFileName . + ImportSpecList = ImportSpec { ";" ImportSpec } . An import statement makes the exported contents of the named package file accessible in this package.