Skip to content

Commit 46f81af

Browse files
committed
rename ParserOptions to Options
1 parent 5de3752 commit 46f81af

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

naga/src/front/wgsl/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ use thiserror::Error;
1919
pub use crate::front::wgsl::error::ParseError;
2020
use crate::front::wgsl::lower::Lowerer;
2121
use crate::Scalar;
22-
pub use parse::ParserOptions;
22+
pub use parse::Options;
2323

2424
pub use crate::front::wgsl::parse::directive::language_extension::{
2525
ImplementedLanguageExtension, LanguageExtension, UnimplementedLanguageExtension,
2626
};
2727

2828
pub struct Frontend {
2929
parser: Parser,
30-
options: ParserOptions,
30+
options: Options,
3131
}
3232

3333
impl Frontend {
3434
pub const fn new() -> Self {
3535
Self {
3636
parser: Parser::new(),
37-
options: ParserOptions::new(),
37+
options: Options::new(),
3838
}
3939
}
40-
pub const fn new_with_options(options: ParserOptions) -> Self {
40+
pub const fn new_with_options(options: Options) -> Self {
4141
Self {
4242
parser: Parser::new(),
4343
options,

naga/src/front/wgsl/parse/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ impl<'a> BindingParser<'a> {
262262
}
263263

264264
/// Configuration for the whole parser run.
265-
pub struct ParserOptions {
265+
pub struct Options {
266266
/// Controls whether the parser should parse comments.
267267
pub parse_comments: bool,
268268
}
269269

270-
impl ParserOptions {
271-
/// Creates a new `ParserOptions` with default settings.
270+
impl Options {
271+
/// Creates a new `ParserOptions` without comments parsing.
272272
pub const fn new() -> Self {
273-
ParserOptions {
273+
Options {
274274
parse_comments: false,
275275
}
276276
}
@@ -2842,7 +2842,7 @@ impl Parser {
28422842
pub fn parse<'a>(
28432843
&mut self,
28442844
source: &'a str,
2845-
options: &ParserOptions,
2845+
options: &Options,
28462846
) -> Result<ast::TranslationUnit<'a>, Error<'a>> {
28472847
self.reset();
28482848

0 commit comments

Comments
 (0)