green_copper_runtime/preprocessors/
macros.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use quickjs_runtime::jsutils::{JsError, Script, ScriptPreProcessor};

pub struct MacrosPreProcessor {}

impl MacrosPreProcessor {
    pub fn new() -> Self {
        Self {}
    }
}

impl ScriptPreProcessor for MacrosPreProcessor {
    fn process(&self, _script: &mut Script) -> Result<(), JsError> {
        Ok(())
    }
}

impl Default for MacrosPreProcessor {
    fn default() -> Self {
        Self::new()
    }
}