Tweak impossible pattern error messages
This commit is contained in:
parent
4301110c12
commit
9daec9cb22
10 changed files with 19 additions and 17 deletions
|
|
@ -163,7 +163,7 @@ pub enum QueryError {
|
|||
Field(usize, String),
|
||||
Capture(usize, String),
|
||||
Predicate(String),
|
||||
Pattern(usize, String),
|
||||
Structure(usize, String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -1206,8 +1206,8 @@ impl Query {
|
|||
"Unexpected EOF".to_string()
|
||||
};
|
||||
match error_type {
|
||||
ffi::TSQueryError_TSQueryErrorPattern => {
|
||||
Err(QueryError::Pattern(row, message))
|
||||
ffi::TSQueryError_TSQueryErrorStructure => {
|
||||
Err(QueryError::Structure(row, message))
|
||||
}
|
||||
_ => Err(QueryError::Syntax(row, message)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue