cucumber_expressions/
lib.rs

1// Copyright (c) 2021-2025  Brendan Molloy <brendan@bbqsrc.net>,
2//                          Ilya Solovyiov <ilya.solovyiov@gmail.com>,
3//                          Kai Ren <tyranron@gmail.com>
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11#![doc(
12    html_logo_url = "https://avatars.githubusercontent.com/u/91469139?s=128",
13    html_favicon_url = "https://avatars.githubusercontent.com/u/91469139?s=256"
14)]
15#![cfg_attr(docsrs, feature(doc_cfg))]
16#![cfg_attr(any(doc, test), doc = include_str!("../README.md"))]
17#![cfg_attr(not(any(doc, test)), doc = env!("CARGO_PKG_NAME"))]
18#![deny(nonstandard_style, rustdoc::all, trivial_casts, trivial_numeric_casts)]
19#![forbid(non_ascii_idents, unsafe_code)]
20#![warn(
21    clippy::absolute_paths,
22    clippy::allow_attributes,
23    clippy::allow_attributes_without_reason,
24    clippy::as_conversions,
25    clippy::as_pointer_underscore,
26    clippy::as_ptr_cast_mut,
27    clippy::assertions_on_result_states,
28    clippy::branches_sharing_code,
29    clippy::cfg_not_test,
30    clippy::clear_with_drain,
31    clippy::clone_on_ref_ptr,
32    clippy::coerce_container_to_any,
33    clippy::collection_is_never_read,
34    clippy::create_dir,
35    clippy::dbg_macro,
36    clippy::debug_assert_with_mut_call,
37    clippy::decimal_literal_representation,
38    clippy::default_union_representation,
39    clippy::derive_partial_eq_without_eq,
40    clippy::doc_include_without_cfg,
41    clippy::empty_drop,
42    clippy::empty_structs_with_brackets,
43    clippy::equatable_if_let,
44    clippy::empty_enum_variants_with_brackets,
45    clippy::exit,
46    clippy::expect_used,
47    clippy::fallible_impl_from,
48    clippy::filetype_is_file,
49    clippy::float_cmp_const,
50    clippy::fn_to_numeric_cast_any,
51    clippy::get_unwrap,
52    clippy::if_then_some_else_none,
53    clippy::imprecise_flops,
54    clippy::infinite_loop,
55    clippy::iter_on_empty_collections,
56    clippy::iter_on_single_items,
57    clippy::iter_over_hash_type,
58    clippy::iter_with_drain,
59    clippy::large_include_file,
60    clippy::large_stack_frames,
61    clippy::let_underscore_untyped,
62    clippy::literal_string_with_formatting_args,
63    clippy::lossy_float_literal,
64    clippy::map_err_ignore,
65    clippy::map_with_unused_argument_over_ranges,
66    clippy::mem_forget,
67    clippy::missing_assert_message,
68    clippy::missing_asserts_for_indexing,
69    clippy::missing_const_for_fn,
70    clippy::missing_docs_in_private_items,
71    clippy::module_name_repetitions,
72    clippy::multiple_inherent_impl,
73    clippy::multiple_unsafe_ops_per_block,
74    clippy::mutex_atomic,
75    clippy::mutex_integer,
76    clippy::needless_collect,
77    clippy::needless_pass_by_ref_mut,
78    clippy::needless_raw_strings,
79    clippy::non_zero_suggestions,
80    clippy::nonstandard_macro_braces,
81    clippy::option_if_let_else,
82    clippy::or_fun_call,
83    clippy::panic_in_result_fn,
84    clippy::partial_pub_fields,
85    clippy::pathbuf_init_then_push,
86    clippy::pedantic,
87    clippy::precedence_bits,
88    clippy::print_stderr,
89    clippy::print_stdout,
90    clippy::pub_without_shorthand,
91    clippy::rc_buffer,
92    clippy::rc_mutex,
93    clippy::read_zero_byte_vec,
94    clippy::redundant_clone,
95    clippy::redundant_test_prefix,
96    clippy::redundant_type_annotations,
97    clippy::renamed_function_params,
98    clippy::ref_patterns,
99    clippy::rest_pat_in_fully_bound_structs,
100    clippy::return_and_then,
101    clippy::same_name_method,
102    clippy::semicolon_inside_block,
103    clippy::set_contains_or_insert,
104    clippy::shadow_unrelated,
105    clippy::significant_drop_in_scrutinee,
106    clippy::significant_drop_tightening,
107    clippy::single_option_map,
108    clippy::str_to_string,
109    clippy::string_add,
110    clippy::string_lit_as_bytes,
111    clippy::string_lit_chars_any,
112    clippy::string_slice,
113    clippy::suboptimal_flops,
114    clippy::suspicious_operation_groupings,
115    clippy::suspicious_xor_used_as_pow,
116    clippy::tests_outside_test_module,
117    clippy::todo,
118    clippy::too_long_first_doc_paragraph,
119    clippy::trailing_empty_array,
120    clippy::transmute_undefined_repr,
121    clippy::trivial_regex,
122    clippy::try_err,
123    clippy::undocumented_unsafe_blocks,
124    clippy::unimplemented,
125    clippy::uninhabited_references,
126    clippy::unnecessary_safety_comment,
127    clippy::unnecessary_safety_doc,
128    clippy::unnecessary_self_imports,
129    clippy::unnecessary_struct_initialization,
130    clippy::unused_peekable,
131    clippy::unused_result_ok,
132    clippy::unused_trait_names,
133    clippy::unwrap_in_result,
134    clippy::unwrap_used,
135    clippy::use_debug,
136    clippy::use_self,
137    clippy::useless_let_if_seq,
138    clippy::verbose_file_reads,
139    clippy::volatile_composites,
140    clippy::while_float,
141    clippy::wildcard_enum_match_arm,
142    ambiguous_negative_literals,
143    closure_returning_async_block,
144    future_incompatible,
145    impl_trait_redundant_captures,
146    let_underscore_drop,
147    macro_use_extern_crate,
148    meta_variable_misuse,
149    missing_copy_implementations,
150    missing_debug_implementations,
151    missing_docs,
152    redundant_lifetimes,
153    rust_2018_idioms,
154    single_use_lifetimes,
155    unit_bindings,
156    unnameable_types,
157    unreachable_pub,
158    unstable_features,
159    unused,
160    variant_size_differences
161)]
162
163pub mod ast;
164mod combinator;
165#[cfg(feature = "into-regex")]
166pub mod expand;
167pub mod parse;
168
169#[doc(inline)]
170pub use self::ast::{
171    Alternation, Alternative, Expression, Optional, Parameter,
172    SingleAlternation, SingleExpression, Spanned,
173};