Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove need of pest3_core as a dependency for pest3 users #18

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

Tartasprint
Copy link
Contributor

@Tartasprint Tartasprint commented Oct 18, 2024

Now a user has to put just one line in the dependencies:

[package]
name = "test3"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pest3 = { version = "0.0.0-prealpha0", path = "../pest3/pest", features = [ 'derive' ] }

In order to do that I have:

  • made the full_rule_structmacro public (even to the user)
  • added a meta feature to the generator crate, so that I can activate it in the generator's tests.

Summary by CodeRabbit

  • New Features

    • Introduced the full_rule_struct macro for enhanced parsing capabilities.
    • Added new traits: PairContainer, EmptyPairContainer, PairTree, TypedParser, and NeverFailedTypedNode for improved functionality in handling typed nodes and pairs.
    • Enabled a new meta feature in the pest3_generator package.
  • Bug Fixes

    • Updated macro invocation to ensure correct namespace resolution across multiple rule definitions.
  • Documentation

    • Enhanced documentation for new traits and macros to aid user understanding, including detailed descriptions for various rules.

Copy link

coderabbitai bot commented Oct 18, 2024

Walkthrough

The pull request introduces changes to the core/src/typed module by adding the full_rule_struct macro and several new traits to enhance the parsing framework's functionality. It also updates the Cargo.toml files for both pest3_derive and pest3_generator to include new feature specifications. Furthermore, the invocation of the full_rule_struct macro is modified in the generator/src/typed/generator.rs file to reflect its new namespace, ensuring correct resolution in the updated context.

Changes

File Path Change Summary
core/src/typed/mod.rs Added public export of full_rule_struct.
core/src/typed/traits.rs - Added full_rule_struct macro.
- Introduced PairContainer, EmptyPairContainer, PairTree, TypedParser, and NeverFailedTypedNode traits.
- Implemented PairContainer for Option<T> and TypedNode for Option<T>.
derive/Cargo.toml Updated pest3_generator dependency to include meta feature in [dev-dependencies].
generator/Cargo.toml Added [features] section with meta feature for pest3_generator.
generator/src/typed/generator.rs Updated macro invocation from full_rule_struct! to typed::full_rule_struct!.
generator/src/types.rs Added conditional compilation to pest function to support behavior based on the meta feature.
generator/tests/expected.rs Updated macro calls from ::pest3_core::full_rule_struct! to ::pest3_core::typed::full_rule_struct! for various rules.
generator/tests/expected_import_inline.rs Updated macro calls from ::pest3_core::full_rule_struct! to ::pest3_core::typed::full_rule_struct! for multiple rules.
generator/tests/expected_json.rs Updated macro calls from ::pest3_core::full_rule_struct! to ::pest3_core::typed::full_rule_struct! for various rules.
generator/tests/expected_sample.rs Updated macro calls from ::pest3_core::full_rule_struct! to ::pest3_core::typed::full_rule_struct! for multiple rules.

Possibly related PRs

  • move basic types to pest3_core #16: The changes in this PR involve moving basic types to pest3_core, which directly relates to the modifications in the core/src/typed/traits.rs file where the full_rule_struct macro is defined and exported. This indicates a structural change in how types and macros are organized within the project, aligning with the updates made in the main PR.

Poem

🐇 In the meadow where macros play,
A new friend joins us today.
full_rule_struct leaps with glee,
Traits and features, oh so free!
With every hop, our code will grow,
In the garden of logic, watch it flow! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Tartasprint
Copy link
Contributor Author

fixes #7

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (5)
generator/src/types.rs (2)

5-12: LGTM! Consider updating documentation for the new feature.

The conditional compilation introduced here aligns well with the PR objectives. It allows for a more flexible use of the library, simplifying dependencies for most users while still providing access to core functionality when needed.

Consider adding documentation comments to explain:

  1. The purpose of the "meta" feature
  2. When users might need to enable it
  3. The implications of using ::pest3 vs ::pest3_core

This will help users understand when and how to use this feature.


Line range hint 19-22: Consider adding a note about feature-dependent behavior.

While this function hasn't changed directly, its behavior now depends on the "meta" feature due to its use of the pest() function.

Consider adding a comment to this function explaining that its behavior changes based on the "meta" feature. This will help users understand the potential differences in the returned TokenStream.

derive/Cargo.toml (1)

Line range hint 1-24: Consider the following improvements to the Cargo.toml file:

  1. Version constraints: The current exact version constraints (= 0.0.0-prealpha0) for dependencies might be too restrictive for future updates. Consider using more flexible version constraints (e.g., ^0.0.0-prealpha0) to allow for compatible updates.

  2. Rust version: It might be helpful to specify the minimum supported Rust version by adding a rust-version field to the [package] section. This helps users understand the compatibility requirements of your package.

Here's an example of how you could implement these suggestions:

[package]
# ... existing fields ...
rust-version = "1.56" # Replace with your minimum supported Rust version

[dependencies]
pest3_generator = { path = "../generator", version = "^0.0.0-prealpha0" }
pest3_core = { path = "../core", version = "^0.0.0-prealpha0" }

[dev-dependencies]
pest3 = { path = "../pest", version = "^0.0.0-prealpha0" }
pest3_generator = { path = "../generator", version = "^0.0.0-prealpha0", features = [ "meta" ] }
# ... other dev-dependencies ...

These changes would make the package more flexible for future updates while clearly communicating its requirements.

core/src/typed/traits.rs (2)

Line range hint 172-197: Add documentation for public traits and methods

The newly added public traits (PairContainer, EmptyPairContainer, PairTree, TypedParser, NeverFailedTypedNode) and their methods lack RustDoc comments. To enhance code readability and usability for other developers, especially external users of the crate, consider adding documentation comments explaining the purpose and usage of each trait and method.


Line range hint 174-178: Consider simplifying method names for clarity

The method name for_self_or_for_each_child_pair in the PairContainer trait is quite long and may affect readability. Consider renaming it to something more concise, such as for_each_pair, to make the API more user-friendly and intuitive.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f90b4c7 and a833355.

📒 Files selected for processing (6)
  • core/src/typed/mod.rs (1 hunks)
  • core/src/typed/traits.rs (1 hunks)
  • derive/Cargo.toml (1 hunks)
  • generator/Cargo.toml (1 hunks)
  • generator/src/typed/generator.rs (1 hunks)
  • generator/src/types.rs (1 hunks)
🧰 Additional context used
🔇 Additional comments (5)
core/src/typed/mod.rs (1)

12-12: LGTM! Change aligns with PR objectives.

The addition of full_rule_struct to the public exports is a positive change that aligns well with the PR's objective of simplifying dependency requirements for Pest3 users. By making this macro publicly accessible, users can now utilize it directly without needing the pest3_core dependency.

This change is minimal and doesn't affect the existing structure of the module, maintaining backward compatibility while enhancing the public API.

generator/Cargo.toml (1)

9-11: LGTM! Verify the usage of the new 'meta' feature.

The addition of the 'meta' feature aligns with the PR objective of simplifying dependencies for Pest3 users. This flag feature allows for more granular control over the package's functionality.

To ensure the feature is properly utilized, please run the following script:

If no usage is found, consider adding appropriate conditional compilation or documentation to explain how this feature should be used.

✅ Verification successful

Verified!

The 'meta' feature is properly utilized within the codebase as intended.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the 'meta' feature in the codebase.

# Test: Search for conditional compilation or usage of the 'meta' feature
rg --type rust '#\[cfg\(feature\s*=\s*"meta"\)\]' || echo "No usage of 'meta' feature found in conditional compilation"

# Test: Search for other potential uses of the 'meta' feature
rg --type rust 'feature\s*=\s*"meta"' || echo "No other usage of 'meta' feature found"

Length of output: 252

generator/src/types.rs (1)

Line range hint 1-22: Overall, these changes effectively support the PR objectives.

The modifications to the pest() function, along with the introduction of the "meta" feature, successfully simplify the dependency structure for most users while maintaining flexibility for advanced use cases. This aligns well with the PR's goal of removing the need for pest3_core as a direct dependency for typical pest3 users.

To further improve this change:

  1. Consider adding comprehensive documentation about the "meta" feature and its implications.
  2. Ensure that any other parts of the codebase that might be affected by this change (e.g., tests, examples, or documentation) are updated accordingly.
  3. It might be beneficial to add a migration guide or release notes to help existing users adapt to these changes, especially if they were directly using pest3_core.
derive/Cargo.toml (1)

18-18: LGTM! This change aligns with the PR objectives.

The addition of the "meta" feature to pest3_generator in the dev-dependencies is a positive change. It enables the new functionality for testing purposes without affecting the main package dependencies, which aligns well with the PR's goal of simplifying dependency requirements for Pest3 users.

This modification allows for more flexible testing capabilities while maintaining the existing version constraints, ensuring compatibility.

core/src/typed/traits.rs (1)

170-170: 🛠️ Refactor suggestion

Simplify macro export for full_rule_struct

The full_rule_struct macro is being exported using both #[macro_export] and pub use full_rule_struct;, which is redundant. In modern Rust, it's recommended to use pub use to re-export macros from modules instead of using #[macro_export], which places the macro at the crate root and can lead to namespace pollution. Consider removing the #[macro_export] attribute to avoid redundancy and potential conflicts.

Apply this diff to remove #[macro_export]:

-#[macro_export]
 /// Struct for rules with full capacity.
 macro_rules! full_rule_struct {
     // macro body
 }

Likely invalid or redundant comment.

@@ -251,7 +251,7 @@ fn create_rule<'g>(
quote! {
#[allow(unused_imports)]
use #this::typed::SubRule as _;
#this::full_rule_struct!(#name, (#(#args),*), #rule, #rule_val, #inner_type, #content_type, );
#this::typed::full_rule_struct!(#name, (#(#args),*), #rule, #rule_val, #inner_type, #content_type, );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Incomplete Refactoring Detected

Multiple instances of ::pest3_core::full_rule_struct! remain in the codebase. Please update these to use the typed::full_rule_struct! prefix to ensure the pest3_core dependency is fully removed and the refactoring is consistent across all files.

Affected files include:

  • pest/tests/predefined_node.rs
  • generator/tests/expected_import_inline.rs
  • generator/tests/expected_json.rs
  • generator/tests/expected_sample.rs
  • generator/tests/expected_import_dag.rs
  • generator/tests/expected.rs
🔗 Analysis chain

LGTM! This change aligns with the PR objective.

The modification of the macro invocation from #this::full_rule_struct! to #this::typed::full_rule_struct! is correct and aligns with the PR's goal of removing the need for pest3_core as a dependency. This change likely moves the macro definition into a typed module within the current crate, which is a step towards making Pest3 more self-contained.

To ensure this change is consistent across the codebase, let's verify the usage:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining instances of full_rule_struct! without the typed:: prefix
rg --type rust 'full_rule_struct!' | grep -v 'typed::full_rule_struct!'

Length of output: 10599

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (5)
core/src/typed/traits.rs (4)

170-171: LGTM! Consider adding documentation for the full_rule_struct macro.

The full_rule_struct macro is well-implemented and provides a useful way to generate TypedNode implementations. It correctly handles error tracking and span management.

Consider adding documentation for the full_rule_struct macro to explain its purpose and usage. This will help other developers understand when and how to use this macro.


Line range hint 173-186: LGTM! Consider optimizing vec_children_pairs for large containers.

The PairContainer trait is well-designed and provides useful methods for handling pairs. The default implementation for for_self_or_for_each_child_pair is a nice touch.

For the vec_children_pairs method, consider adding a default capacity to the vector to reduce allocations for larger containers. For example:

fn vec_children_pairs(&self) -> Vec<Pair<R>> {
    let mut vec = Vec::with_capacity(16); // Or another appropriate initial capacity
    self.for_each_child_pair(&mut |token| vec.push(token));
    vec
}

Line range hint 202-220: LGTM! Consider optimizing as_pair_tree for large trees.

The PairTree trait is well-designed and provides useful methods for working with pair trees. It extends PairContainer appropriately and includes methods for getting rules and spans.

For the as_pair_tree method, consider adding a way to reuse existing Pair structs or preallocate the children vector to reduce allocations for larger trees. For example:

fn as_pair_tree(&self) -> Pair<R> {
    let rule = Self::get_rule();
    let (start, end) = self.get_span();
    let mut children = Vec::with_capacity(16); // Or another appropriate initial capacity
    self.for_each_child_pair(&mut |token| children.push(token));
    Pair {
        rule,
        start,
        end,
        children,
    }
}

Line range hint 265-315: LGTM! Consider adding more documentation for NeverFailedTypedNode.

The TypedParser and NeverFailedTypedNode traits are well-designed and provide useful abstractions for parsing. The TypedParser trait nicely wraps the TypedNode methods, providing a clear interface for parsing.

For the NeverFailedTypedNode trait, consider adding more documentation to explain its use case and when it should be implemented. This will help other developers understand when to use this trait instead of the regular TypedNode trait. For example:

/// Node of concrete syntax tree that never fails to parse.
///
/// This trait should be implemented for nodes that are guaranteed to always
/// successfully parse, such as optional elements or alternatives where one
/// option always matches. It provides a simpler interface compared to `TypedNode`
/// as it doesn't need to handle failure cases.
pub trait NeverFailedTypedNode<'i, R: RuleType>
where
    Self: Sized + Debug + Clone + PartialEq + Default,
{
    // ... existing methods ...
}
generator/tests/expected.rs (1)

Inconsistent Namespace in full_rule_struct! Macro Calls

The verification script identified instances where the full_rule_struct! macro is used without the ::pest3_core::typed:: namespace:

  • full_rule_struct!(A, (), Rule, Rule::Foo, Empty, Box<Empty>,);

Please update all active macro calls to use the correct namespace to ensure consistency:

::pest3_core::typed::full_rule_struct!(A, (), Rule, Rule::Foo, Empty, Box<Empty>,);

Additionally, review any macro usages in comments to determine if they need updating or can remain as references.

🔗 Analysis chain

Line range hint 78-2141: Consistent Update to full_rule_struct! Macro Namespace

All instances of the full_rule_struct! macro have been updated to use the ::pest3_core::typed namespace, reflecting the transition to the typed version of the parsing framework. This change is consistently applied across all rule structures and appears correct.

To ensure that all macro calls have been updated appropriately and no instances have been missed, please run the following script:

This script searches for all occurrences of full_rule_struct! and filters out those that are correctly prefixed with ::pest3_core::typed::. Any output would indicate macro calls that have not been updated to the new namespace.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all calls to `full_rule_struct!` use the `::pest3_core::typed` namespace.

# Expected: No output indicates all macro calls are correctly updated.

rg --type rust --no-heading --no-filename 'full_rule_struct!' | \
  rg -v '::pest3_core::typed::full_rule_struct!'

Length of output: 297

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a833355 and f12594e.

📒 Files selected for processing (10)
  • core/src/typed/mod.rs (1 hunks)
  • core/src/typed/traits.rs (1 hunks)
  • derive/Cargo.toml (1 hunks)
  • generator/Cargo.toml (1 hunks)
  • generator/src/typed/generator.rs (1 hunks)
  • generator/src/types.rs (1 hunks)
  • generator/tests/expected.rs (27 hunks)
  • generator/tests/expected_import_inline.rs (8 hunks)
  • generator/tests/expected_json.rs (25 hunks)
  • generator/tests/expected_sample.rs (75 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • core/src/typed/mod.rs
  • derive/Cargo.toml
  • generator/Cargo.toml
  • generator/src/typed/generator.rs
  • generator/src/types.rs
🧰 Additional context used
🔇 Additional comments (10)
core/src/typed/traits.rs (1)

Line range hint 196-200: LGTM! EmptyPairContainer trait is well-designed.

The EmptyPairContainer trait and its implementation for PairContainer are simple, efficient, and serve their purpose well. This design allows for easy handling of empty containers in the parsing system.

generator/tests/expected_import_inline.rs (8)

Line range hint 71-82: Confirm updated macro path for r#x rule

The full_rule_struct! macro invocation for the r#x rule has been correctly updated to use ::pest3_core::typed::full_rule_struct!. This change aligns with the new public accessibility of the macro under pest3_core::typed, allowing users to access it directly without needing the pest3_core dependency.


Line range hint 83-100: Verify correctness of cvt_into() usage in macro

In the macro invocation at line 83, the method super::Rule::r#x.cvt_into() is used when specifying the rule. Please verify that the cvt_into() method is properly implemented and that it correctly converts super::Rule::r#x into the expected super rule type. This ensures seamless integration and correct rule identification during parsing.


Line range hint 177-206: Update macro path for r#w rule

The full_rule_struct! macro invocation for the r#w rule has been updated to use ::pest3_core::typed::full_rule_struct!. This is consistent with the changes made to make the macro publicly accessible and reduces unnecessary dependencies.


Line range hint 237-266: Update macro invocation and helper function in r#x0

The macro invocation for r#x0 has been correctly updated to use the new path ::pest3_core::typed::full_rule_struct!. Additionally, the helper function r#x is implemented to return a reference to minimal::rules::r#x, providing convenient access to the matched content.


Line range hint 316-344: Check helper functions in r#x1

The helper functions r#w and r#x in r#x1 correctly provide access to their respective matched rules. Ensure that these functions accurately represent the grammar (minimal::x - w) and that the sequence structure is implemented properly.


Line range hint 407-436: Confirm tuple handling in r#x2 helper function

The helper function r#x in r#x2 returns a tuple of references to minimal::rules::r#x. This implementation should correctly represent the grammar (minimal::x - minimal::x). Please confirm that tuple handling is as intended and that both elements are appropriately accessed.


Line range hint 489-518: Review implementation of r#x3 with string match

In r#x3, the helper function r#x provides access to minimal::rules::r#x, corresponding to the grammar (minimal::x - "y"). Ensure that the sequence and exclusion with the string "y" are correctly handled and that the implementation aligns with the intended parsing behavior.


Line range hint 569-598: Validate choice pattern in r#x4

The r#x4 rule uses a Choice2 generic to represent the grammar (minimal::x | "z"). The helper function r#x returns an Option<&minimal::rules::r#x>, which is Some if minimal::x was matched and None otherwise. Verify that this choice pattern correctly handles both possibilities and that the parsing logic functions as expected.

generator/tests/expected_sample.rs (1)

118-118: Ensure all macro invocations are correctly updated to the new namespace

The code updates the full_rule_struct! macro invocations to use the new namespace ::pest3_core::typed::full_rule_struct!. Please verify that all occurrences of full_rule_struct! in the codebase have been updated to avoid any inconsistencies or build issues.

Run the following script to check for any instances of full_rule_struct! not using the new namespace:

Also applies to: 171-171, 224-224, 284-284, 344-344, 397-397, 452-452, 533-533, 624-624, 715-715, 789-789, 877-877, 949-949, 1021-1021, 1093-1093, 1156-1156, 1219-1219, 1288-1288, 1358-1358, 1426-1426, 1495-1495, 1565-1565, 1633-1633, 1707-1707, 1788-1788, 1859-1859, 1935-1935, 2016-2016, 2087-2087, 2158-2158, 2229-2229, 2300-2300, 2371-2371, 2442-2442, 2513-2513, 2612-2612, 2704-2704, 2783-2783, 2855-2855, 2919-2919, 2965-2965, 3025-3025, 3085-3085, 3145-3145, 3205-3205, 3321-3321, 3456-3456, 3556-3556, 3644-3644, 3747-3747, 3857-3857, 3989-3989, 4118-4118, 4228-4228, 4336-4336, 4525-4525, 4657-4657, 4739-4739, 4821-4821, 4903-4903, 4985-4985, 5067-5067, 5149-5149, 5231-5231, 5313-5313, 5393-5393, 5470-5470, 5566-5566, 5653-5653, 5724-5724, 5798-5798, 5872-5872, 5943-5943, 5998-5998, 6056-6056

@@ -118,7 +118,7 @@ pub mod rules {
}
#[allow(unused_imports)]
use pest3_core::typed::SubRule as _;
::pest3_core::full_rule_struct!(
::pest3_core::typed::full_rule_struct!(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refactor Repeated full_rule_struct! Macro Calls to Reduce Duplication

The use of full_rule_struct! macro with similar parameters is repeated across multiple rules (e.g., lines 121, 149, 264, etc.). This repetition can make the code harder to maintain. Consider creating a helper macro or function to abstract common patterns and reduce code duplication.

Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks a lot!

@tomtau tomtau merged commit 9af4957 into pest-parser:master Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants