From 00e6b5d26c82d5faff066c24418a0eb5741efcd1 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 28 Jan 2019 20:03:56 +0000 Subject: Parse and validate attributes in blocks --- crates/ra_syntax/src/yellow/syntax_error.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_syntax/src/yellow/syntax_error.rs') 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 { UnicodeEscapeOutOfRange, UnclosedString, InvalidSuffix, + InvalidBlockAttr, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -136,6 +137,9 @@ impl fmt::Display for SyntaxErrorKind { UnicodeEscapeOutOfRange => write!(f, "Unicode escape code should be at most 0x10FFFF"), UnclosedString => write!(f, "Unclosed string literal"), InvalidSuffix => write!(f, "Invalid literal suffix"), + InvalidBlockAttr => { + write!(f, "A block in this position cannot accept inner attributes") + } ParseError(msg) => write!(f, "{}", msg.0), } } -- cgit v1.2.3