aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-01-28 08:07:56 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-01-28 08:07:56 +0000
commitaff82e5ee1d587b858e7237511e611bb8cc61cf3 (patch)
tree83d1a4bbaa4be96f76c2d48c00ad479173f61274 /src/lib.rs
parentefadcf715862a2d96af0f57d2b53bfa325390779 (diff)
parent4244948c6b1a62bd0e1ef276d1f0cc22c36f6f66 (diff)
Merge #16
16: Proof-of-concept SyntaxKind as enum r=matklad a=CAD97 This was the one bit about the original RFC I was most confused about. Why isn't `SyntaxKind` a normal `enum`? If it's to signify that it's non-exhaustive [`#[non_exhaustive]`](https://github.com/rust-lang/rust/issues/44109) should be used. (Or `#[doc(hidden)] __Nonexhaustive` on stable.) If it's so that more variants can be added externally, why? There's no need for that, that I can foresee. If it's to expose the `SyntaxKind` type but not any of its instances, why? This is the only actual benefit I can see of this pseudo-enum style. This diff is meant to be as non-invasive as possible, and as such reexports all symbols as they existed prior to this. It's diffed on top of the assumed-good-to-merge #15 to avoid the conflict between them. Diff without #15: <https://github.com/matklad/libsyntax2/pull/16/commits/4244948c6b1a62bd0e1ef276d1f0cc22c36f6f66> Just `src/syntax_kinds.rs`: <https://github.com/matklad/libsyntax2/pull/16/commits/4244948c6b1a62bd0e1ef276d1f0cc22c36f6f66#diff-8f0d69eb4fe0148851505f787b6fd3bb>
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 87a9d11ea..ad333582c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,8 +22,6 @@ mod tree;
22mod lexer; 22mod lexer;
23mod parser; 23mod parser;
24 24
25#[cfg_attr(rustfmt, rustfmt_skip)]
26#[allow(missing_docs)]
27pub mod syntax_kinds; 25pub mod syntax_kinds;
28pub use text::{TextRange, TextUnit}; 26pub use text::{TextRange, TextUnit};
29pub use tree::{File, FileBuilder, Node, Sink, SyntaxKind, Token}; 27pub use tree::{File, FileBuilder, Node, Sink, SyntaxKind, Token};