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

Support conditionals #4

Open
2 tasks
thomasjohns opened this issue Feb 21, 2021 · 0 comments
Open
2 tasks

Support conditionals #4

thomasjohns opened this issue Feb 21, 2021 · 0 comments

Comments

@thomasjohns
Copy link
Owner

thomasjohns commented Feb 21, 2021

E.g.

transform Test {
    headers {
        'a' -> 'A'
    }
    values {
       ['A'] -> add 1 | mult 2
       ['B'] -> {
           | if ['A'] > 1 {
               ['C']
           } else {
               ['A']
           }
           | if ['a'] == 3 {
               add 1 | mult 2
           }
           | square
       }
       ['C'] -> {
           | trim
           | title
           | replace '  ' ' '
       }
   }
}

Stages

  • parse
  • interpret
@thomasjohns thomasjohns self-assigned this Feb 21, 2021
@thomasjohns thomasjohns removed their assignment Aug 2, 2022
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

No branches or pull requests

1 participant