INNER CODE UNIT · Rust

with_quote_and_span

apache/datafusion-sqlparser-rs · src/ast/mod.rs:375

    pub fn with_quote_and_span<S>(quote: char, span: Span, value: S) -> Self
    where
        S: Into<String>,
    {
        assert!(quote == '\'' || quote == '"' || quote == '`' || quote == '[');
        Ident {
            value: value.into(),
            quote_style: Some(quote),
            span,
        }
    }
}

impl From<&str> for Ident {
    fn from(value: &str) -> Self {
        Ident {
            value: value.to_string(),
            quote_style: None,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…