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

[feature] implement condition objects #612

Merged
merged 4 commits into from
Oct 8, 2022

Commits on Oct 8, 2022

  1. feat! implement condition objects which implement various operators +…

    … tests
    
    Works by
    - providing a factory `make_condition` which wraps functions as
      condition objects
    - providing two modules `conditions.show` and `condition.expand` which
      contain a collection of common conditions already wrapped as condition
      objects
    
    Weird might be the decision to use `%` as `==`-operator. This way chosen
    because we can`t use `__eq` as this automatically converts the return
    value to a boolean (we need to return condition objects). So we decided
    to use something which make ones head scratch and look it up in the docs
    (or simply don't use it)
    
    Note: one still can continue to use the `expand_conditions`
    module (just rediects to the `conditions/expand` module) for backwards
    compatibility. This is deprecated though.
    atticus-sullivan committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    4435518 View commit details
    Browse the repository at this point in the history
  2. conditions.show.line_end: simply compare strings

    this is fast enough due to luas behaviour of interning strings (->
    simple check if pointers are equal)
    atticus-sullivan committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    3838cb3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9867a30 View commit details
    Browse the repository at this point in the history
  4. Auto generate docs

    atticus-sullivan authored and github-actions[bot] committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    4bc3e35 View commit details
    Browse the repository at this point in the history