mirror of
https://github.com/golang/go
synced 2024-11-22 00:04:41 -07:00
- 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>.
|
which is a function with a <i>receiver</i>.
|
||||||
</p>
|
</p>
|
||||||
<pre class="ebnf">
|
<pre class="ebnf">
|
||||||
MethodDecl = "func" Receiver identifier Signature [ Body ] .
|
MethodDecl = "func" Receiver MethodName Signature [ Body ] .
|
||||||
Receiver = "(" [ identifier ] [ "*" ] TypeName ")" .
|
Receiver = "(" [ identifier ] [ "*" ] TypeName ")" .
|
||||||
|
MethodName = identifier .
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<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.
|
argument that is the receiver of the method.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="grammar">
|
<pre class="ebnf">
|
||||||
MethodExpr = ReceiverType "." MethodName .
|
MethodExpr = ReceiverType "." MethodName .
|
||||||
ReceiverType = TypeName | "(" "*" TypeName ")" .
|
ReceiverType = TypeName | "(" "*" TypeName ")" .
|
||||||
MethodName = identifier .
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user