diff options
author | DJMcNab <[email protected]> | 2019-01-28 20:03:56 +0000 |
---|---|---|
committer | DJMcNab <[email protected]> | 2019-01-28 20:03:56 +0000 |
commit | 00e6b5d26c82d5faff066c24418a0eb5741efcd1 (patch) | |
tree | 82ad741bab4f820850ba6f13e2b760cc840f43fb /crates/ra_syntax/src/yellow/syntax_error.rs | |
parent | 137b1ccb715fe795cdf6c528bef6f8df3387f158 (diff) |
Parse and validate attributes in blocks
Diffstat (limited to 'crates/ra_syntax/src/yellow/syntax_error.rs')
-rw-r--r-- | crates/ra_syntax/src/yellow/syntax_error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/yellow/syntax_error.rs b/crates/ra_syntax/src/yellow/syntax_error.rs index 534f3511e..c52c44cc3 100644 --- a/crates/ra_syntax/src/yellow/syntax_error.rs +++ b/crates/ra_syntax/src/yellow/syntax_error.rs | |||
@@ -94,6 +94,7 @@ pub enum SyntaxErrorKind { | |||
94 | UnicodeEscapeOutOfRange, | 94 | UnicodeEscapeOutOfRange, |
95 | UnclosedString, | 95 | UnclosedString, |
96 | InvalidSuffix, | 96 | InvalidSuffix, |
97 | InvalidBlockAttr, | ||
97 | } | 98 | } |
98 | 99 | ||
99 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 100 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -136,6 +137,9 @@ impl fmt::Display for SyntaxErrorKind { | |||
136 | UnicodeEscapeOutOfRange => write!(f, "Unicode escape code should be at most 0x10FFFF"), | 137 | UnicodeEscapeOutOfRange => write!(f, "Unicode escape code should be at most 0x10FFFF"), |
137 | UnclosedString => write!(f, "Unclosed string literal"), | 138 | UnclosedString => write!(f, "Unclosed string literal"), |
138 | InvalidSuffix => write!(f, "Invalid literal suffix"), | 139 | InvalidSuffix => write!(f, "Invalid literal suffix"), |
140 | InvalidBlockAttr => { | ||
141 | write!(f, "A block in this position cannot accept inner attributes") | ||
142 | } | ||
139 | ParseError(msg) => write!(f, "{}", msg.0), | 143 | ParseError(msg) => write!(f, "{}", msg.0), |
140 | } | 144 | } |
141 | } | 145 | } |