mirror of https://github.com/golang/go.git
- silence ebnflint: mark syntax section as "ebnf" instead of "grammar"
- re-use MethodName production R=r DELTA=4 (1 added, 1 deleted, 2 changed) OCL=34734 CL=34734
This commit is contained in:
parent
20011bc878
commit
da961881b4
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue