Skip to content

Commit 0a93fd7

Browse files
committed
deps: update preprocess to nom 8.0
1 parent e28101b commit 0a93fd7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

librashader-preprocess/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "RetroArch shaders for all."
1313

1414
[dependencies]
1515
thiserror = "2"
16-
nom = "7.1.1"
16+
nom = "8.0.0"
1717
librashader-common = { path = "../librashader-common", version = "0.8.0" }
1818
encoding_rs = "0.8.31"
1919
serde = { version = "1.0", optional = true }

librashader-preprocess/src/pragma.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::{PreprocessError, ShaderParameter};
22
use librashader_common::ImageFormat;
33
use nom::bytes::complete::{is_not, tag, take_while};
4+
use nom::Parser;
45

56
use librashader_common::map::ShortString;
67
use nom::character::complete::{multispace0, multispace1};
@@ -22,7 +23,7 @@ fn parse_parameter_string(input: &str) -> Result<ShaderParameter, PreprocessErro
2223
let (input, _) = tag("#pragma parameter ")(input)?;
2324
let (input, name) = take_while(|c| c != ' ' && c != '\t')(input)?;
2425
let (input, _) = multispace1(input)?;
25-
let (input, description) = delimited(tag("\""), is_not("\""), tag("\""))(input)?;
26+
let (input, description) = delimited(tag("\""), is_not("\""), tag("\"")).parse(input)?;
2627
let (input, _) = multispace1(input)?;
2728
Ok((input, (name, description)))
2829
}
@@ -46,7 +47,7 @@ fn parse_parameter_string(input: &str) -> Result<ShaderParameter, PreprocessErro
4647

4748
// https://github.com/libretro/slang-shaders/blob/0e2939787076e4a8a83be89175557fde23abe837/crt/shaders/crt-slangtest/parameters.inc#L1
4849
let (input, _) = multispace0(input)?;
49-
let (input, step) = opt(float)(input)?;
50+
let (input, step) = opt(float).parse(input)?;
5051
Ok((
5152
input,
5253
ShaderParameter {

0 commit comments

Comments
 (0)