diff --git a/src/lex.rs b/src/lex.rs index 2453d876d..5b8c5fc87 100644 --- a/src/lex.rs +++ b/src/lex.rs @@ -622,6 +622,7 @@ pub enum AsciiToken { Underscore, Bar, Semicolon, + DoubleSemicolon, Star, Percent, Caret, @@ -650,6 +651,7 @@ impl fmt::Display for AsciiToken { AsciiToken::Underscore => write!(f, "_"), AsciiToken::Bar => write!(f, "|"), AsciiToken::Semicolon => write!(f, ";"), + AsciiToken::DoubleSemicolon => write!(f, ";;"), AsciiToken::Star => write!(f, "*"), AsciiToken::Percent => write!(f, "%"), AsciiToken::Caret => write!(f, "^"), @@ -798,6 +800,7 @@ impl<'a> Lexer<'a> { "⟩" => self.end(CloseAngle, start), "_" if self.peek_char() != Some("_") => self.end(Underscore, start), "|" => self.end(Bar, start), + ";" if self.next_char_exact(";") => self.end(DoubleSemicolon, start), ";" => self.end(Semicolon, start), "-" if self.next_chars_exact(["-", "-"]) => self.end(TripleMinus, start), "'" if self.next_char_exact("'") => { diff --git a/src/parse.rs b/src/parse.rs index be1256b96..173cd4802 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -967,9 +967,9 @@ impl<'i> Parser<'i> { spaces } else if let Some(word) = self.try_func() { word - } else if let Some(span) = self.try_exact(Quote.into()) { + } else if let Some(span) = self.try_exact(Semicolon.into()) { span.sp(Word::BreakLine) - } else if let Some(span) = self.try_exact(Quote2.into()) { + } else if let Some(span) = self.try_exact(DoubleSemicolon.into()) { span.sp(Word::UnbreakLine) } else if let Some(span) = self.try_exact(Semicolon.into()) { span.sp(Word::SemicolonPop) diff --git a/todo.md b/todo.md index f2462c6a6..bc877e5e4 100644 --- a/todo.md +++ b/todo.md @@ -3,7 +3,6 @@ - 0.12 - Use `'` for modules - Deprecate swizzles - - Use `;` for line splitting - Make branch for `but`/`with` stabilization and `,` deprecation - Stabilize labels - Goto definition/Ctrl+click on git imports to go to the URL