Skip to content

Commit

Permalink
Allow trailing commas in error_node_position and in `error_position…
Browse files Browse the repository at this point in the history
…` macros (#1711)

Co-authored-by: Geoffroy Couprie <contact@geoffroycouprie.com>
  • Loading branch information
GuillaumeGomez and Geal authored May 5, 2024
1 parent 9b8c752 commit 83cfb17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ impl ErrorKind {
#[allow(unused_variables)]
#[macro_export(local_inner_macros)]
macro_rules! error_position(
($input:expr, $code:expr) => ({
($input:expr, $code:expr $(,)?) => ({
$crate::error::make_error($input, $code)
});
);
Expand All @@ -643,7 +643,7 @@ macro_rules! error_position(
#[allow(unused_variables)]
#[macro_export(local_inner_macros)]
macro_rules! error_node_position(
($input:expr, $code:expr, $next:expr) => ({
($input:expr, $code:expr, $next:expr $(,)?) => ({
$crate::error::append_error($input, $code, $next)
});
);
Expand Down

0 comments on commit 83cfb17

Please sign in to comment.