move syntax error to parser

This commit is contained in:
Aleksey Kladov 2019-02-20 23:17:07 +03:00
parent 61992dc1cd
commit 882c47f187
6 changed files with 24 additions and 25 deletions

View file

@ -1,6 +1,6 @@
use std::fmt;
use crate::{TextRange, TextUnit};
use crate::{TextRange, TextUnit, parsing::ParseError};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SyntaxError {
@ -95,9 +95,6 @@ pub enum SyntaxErrorKind {
InvalidMatchInnerAttr,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ParseError(pub String);
impl fmt::Display for SyntaxErrorKind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use self::SyntaxErrorKind::*;