Skip to content

Conversation

@httpdss
Copy link
Owner

@httpdss httpdss commented Nov 16, 2024

Overview

This PR introduces the with clause to enhance the flexibility of variable management within nested structures. This feature allows for more granular control by merging user-specified variables with global variables.

Changes

  • Documentation Updates:
    • Added a section on the with clause in README.md and README.es.md with examples.
  • Example Updates:
    • Modified example/structure.yaml to include a sample usage of the with clause.
  • Code Enhancements:
    • Updated generate.py to:
      • Parse and merge variables specified in the with clause.
      • Integrate the merged variables into the generation process seamlessly.

Justification

The with clause simplifies complex scenarios by enabling users to pass additional context-specific variables to nested structures without altering global variables. This improves code modularity and usability.

Impact

  • Enhanced readability and flexibility in defining nested structures.
  • Backward compatibility is maintained as the feature is additive and optional.
  • Improved developer experience by reducing configuration overhead in complex projects.

@httpdss httpdss changed the title Add support for with clause in nested structures Add with Clause for Enhanced Variable Management in Nested Structures Nov 16, 2024
@httpdss httpdss marked this pull request as ready for review November 16, 2024 18:58
@httpdss httpdss merged commit 267247e into main Nov 16, 2024
4 checks passed
@httpdss httpdss deleted the with-clause branch November 16, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants