]> Cypherpunks repositories - gostls13.git/commitdiff
- silence ebnflint: mark syntax section as "ebnf" instead of "grammar"
authorRobert Griesemer <gri@golang.org>
Thu, 17 Sep 2009 18:01:50 +0000 (11:01 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 17 Sep 2009 18:01:50 +0000 (11:01 -0700)
- re-use MethodName production

R=r
DELTA=4  (1 added, 1 deleted, 2 changed)
OCL=34734
CL=34734

doc/go_spec.html

index 301466bebb506e8e7fa16a75922651105c0234f9..14a43c220213de3ff21b66c245156636fc9830e6 100644 (file)
@@ -1731,8 +1731,9 @@ A method declaration binds an identifier to a method,
 which is a function with a <i>receiver</i>.
 </p>
 <pre class="ebnf">
-MethodDecl = "func" Receiver identifier Signature [ Body ] .
+MethodDecl = "func" Receiver MethodName Signature [ Body ] .
 Receiver = "(" [ identifier ] [ "*" ] TypeName ")" .
+MethodName = identifier .
 </pre>
 
 <p>
@@ -2862,10 +2863,9 @@ with the same arguments as <code>M</code> prefixed by an additional
 argument that is the receiver of the method.
 </p>
 
-<pre class="grammar">
+<pre class="ebnf">
 MethodExpr    = ReceiverType "." MethodName .
 ReceiverType  = TypeName | "(" "*" TypeName ")" .
-MethodName    = identifier .
 </pre>
 
 <p>