Skip to content

Commit 43ae306

Browse files
committed
Break up _ExternCrate_ grammar.
1 parent 085f0a8 commit 43ae306

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/items/extern-crates.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
> **<sup>Syntax:<sup>**\
44
> _ExternCrate_ :\
5-
> &nbsp;&nbsp; `extern` `crate` ( [IDENTIFIER] | `self` ) (`as` ( [IDENTIFIER] | `_` ) )<sup>?</sup> `;`
5+
> &nbsp;&nbsp; `extern` `crate` _CrateRef_ _AsClause_<sup>?</sup> `;`
6+
>
7+
> _CrateRef_ :\
8+
> &nbsp;&nbsp; [IDENTIFIER] | `self`
9+
>
10+
> _AsClause_ :\
11+
> &nbsp;&nbsp; `as` ( [IDENTIFIER] | `_` )
612
713
An _`extern crate` declaration_ specifies a dependency on an external crate.
814
The external crate is then bound into the declaring scope as the [identifier]

0 commit comments

Comments
 (0)