1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
use crate::{Bytes, Token};

#[derive(Debug, Clone, PartialEq)]
pub struct StringValue {
    pub bytes: Bytes,
}

impl StringValue {
    pub fn new(token: Box<Token>) -> Self {
        Self {
            bytes: token.token_value,
        }
    }

    pub fn empty() -> Self {
        Self {
            bytes: Bytes::empty(),
        }
    }
}