diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
commit | 9ce7e8110254e8db476c96bce2eecb2d16983159 (patch) | |
tree | abaddbafc4593948849394b430e3bde5c624fa22 /src/yellow/green.rs | |
parent | 2a2815266b35de12bd3c48cc405e8b3e8fcf8885 (diff) |
cleanups
Diffstat (limited to 'src/yellow/green.rs')
-rw-r--r-- | src/yellow/green.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/yellow/green.rs b/src/yellow/green.rs index cda4e2167..8ddcc74b8 100644 --- a/src/yellow/green.rs +++ b/src/yellow/green.rs | |||
@@ -80,8 +80,14 @@ fn assert_send_sync() { | |||
80 | 80 | ||
81 | #[derive(Clone, Debug)] | 81 | #[derive(Clone, Debug)] |
82 | pub(crate) enum GreenLeaf { | 82 | pub(crate) enum GreenLeaf { |
83 | Whitespace { newlines: u8, spaces: u8 }, | 83 | Whitespace { |
84 | Token { kind: SyntaxKind, text: Option<Arc<str>> }, | 84 | newlines: u8, |
85 | spaces: u8, | ||
86 | }, | ||
87 | Token { | ||
88 | kind: SyntaxKind, | ||
89 | text: Option<Arc<str>>, | ||
90 | }, | ||
85 | } | 91 | } |
86 | 92 | ||
87 | impl GreenLeaf { | 93 | impl GreenLeaf { |
@@ -121,7 +127,7 @@ impl GreenLeaf { | |||
121 | assert!(newlines <= N_NEWLINES && spaces <= N_SPACES); | 127 | assert!(newlines <= N_NEWLINES && spaces <= N_SPACES); |
122 | &WS[N_NEWLINES - newlines..N_NEWLINES + spaces] | 128 | &WS[N_NEWLINES - newlines..N_NEWLINES + spaces] |
123 | } | 129 | } |
124 | GreenLeaf::Token { kind, text, } => match text { | 130 | GreenLeaf::Token { kind, text } => match text { |
125 | None => kind.static_text().unwrap(), | 131 | None => kind.static_text().unwrap(), |
126 | Some(t) => t, | 132 | Some(t) => t, |
127 | }, | 133 | }, |