librashader/librashader-preprocess/src/lib.rs

31 lines
676 B
Rust
Raw Normal View History

mod error;
mod include;
2022-10-21 21:04:00 -04:00
mod pragma;
pub use error::*;
#[cfg(test)]
mod test {
use crate::include::read_source;
2022-10-21 23:37:47 -04:00
use crate::pragma;
#[test]
pub fn preprocess_file() {
2022-10-21 21:04:00 -04:00
let result =
read_source("../test/slang-shaders/blurs/shaders/royale/blur3x3-last-pass.slang")
.unwrap();
eprintln!("{result}")
}
2022-10-21 23:37:47 -04:00
#[test]
pub fn get_param_pragmas() {
let result =
read_source("../test/slang-shaders/crt/shaders/crt-maximus-royale/src/ntsc_pass1.slang")
.unwrap();
let params = pragma::parse_pragma_meta(result)
.unwrap();
eprintln!("{params:?}")
}
2022-10-21 21:04:00 -04:00
}