aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/yellow/syntax_error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/yellow/syntax_error.rs')
-rw-r--r--crates/ra_syntax/src/yellow/syntax_error.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/yellow/syntax_error.rs b/crates/ra_syntax/src/yellow/syntax_error.rs
index cf7b1d495..c32ee650d 100644
--- a/crates/ra_syntax/src/yellow/syntax_error.rs
+++ b/crates/ra_syntax/src/yellow/syntax_error.rs
@@ -72,6 +72,16 @@ pub enum SyntaxErrorKind {
72 EmptyChar, 72 EmptyChar,
73 UnclosedChar, 73 UnclosedChar,
74 OverlongChar, 74 OverlongChar,
75 EmptyByte,
76 UnclosedByte,
77 OverlongByte,
78 ByteOutOfRange,
79 UnescapedByte,
80 EmptyByteEscape,
81 InvalidByteEscape,
82 TooShortByteCodeEscape,
83 MalformedByteCodeEscape,
84 UnicodeEscapeForbidden,
75 EmptyAsciiEscape, 85 EmptyAsciiEscape,
76 InvalidAsciiEscape, 86 InvalidAsciiEscape,
77 TooShortAsciiCodeEscape, 87 TooShortAsciiCodeEscape,
@@ -98,6 +108,19 @@ impl fmt::Display for SyntaxErrorKind {
98 EmptyChar => write!(f, "Empty char literal"), 108 EmptyChar => write!(f, "Empty char literal"),
99 UnclosedChar => write!(f, "Unclosed char literal"), 109 UnclosedChar => write!(f, "Unclosed char literal"),
100 OverlongChar => write!(f, "Char literal should be one character long"), 110 OverlongChar => write!(f, "Char literal should be one character long"),
111 EmptyByte => write!(f, "Empty byte literal"),
112 UnclosedByte => write!(f, "Unclosed byte literal"),
113 OverlongByte => write!(f, "Byte literal should be one character long"),
114 ByteOutOfRange => write!(f, "Byte should be a valid ASCII character"),
115 UnescapedByte => write!(f, "This byte should always be escaped"),
116 EmptyByteEscape => write!(f, "Empty escape sequence"),
117 InvalidByteEscape => write!(f, "Invalid escape sequence"),
118 TooShortByteCodeEscape => write!(f, "Escape sequence should have two digits"),
119 MalformedByteCodeEscape => write!(f, "Escape sequence should be a hexadecimal number"),
120 UnicodeEscapeForbidden => write!(
121 f,
122 "Unicode escapes are not allowed in byte literals or byte strings"
123 ),
101 TooShortAsciiCodeEscape => write!(f, "Escape sequence should have two digits"), 124 TooShortAsciiCodeEscape => write!(f, "Escape sequence should have two digits"),
102 AsciiCodeEscapeOutOfRange => { 125 AsciiCodeEscapeOutOfRange => {
103 write!(f, "Escape sequence should be between \\x00 and \\x7F") 126 write!(f, "Escape sequence should be between \\x00 and \\x7F")