mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
Support no_std
(#332)
* Support `no_std` Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix typo Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
parent
293133f910
commit
5bc109a7ad
13 changed files with 71 additions and 14 deletions
|
@ -12,8 +12,15 @@
|
|||
|
||||
//! SQL Parser
|
||||
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{
|
||||
boxed::Box,
|
||||
format,
|
||||
string::{String, ToString},
|
||||
vec,
|
||||
vec::Vec,
|
||||
};
|
||||
use core::fmt;
|
||||
|
||||
use log::debug;
|
||||
|
||||
|
@ -81,7 +88,8 @@ impl fmt::Display for ParserError {
|
|||
}
|
||||
}
|
||||
|
||||
impl Error for ParserError {}
|
||||
#[cfg(feature = "std")]
|
||||
impl std::error::Error for ParserError {}
|
||||
|
||||
pub struct Parser<'a> {
|
||||
tokens: Vec<Token>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue