===
Env
===
let x = env "MY_ENV" | assert-eq "foo"
---

(source_file
  (let
    (identifier)
    (exp
      (getEnv
        (exp
          (pipe
            (exp
              (string))
            (op
              (assertEq
                (exp
                  (string))))))))))

===
EnvTaskAll
===
task all {
    build ["a"]
}

---

(source_file
  (taskBlock
    name: (identifier)
    (recipe
      (build
        (exp
          (list
            (exp
              (string))))))))

===
Passthrough
===
build "passthrough" {
    run "write-env MY_ENV <out>"
}
---

(source_file
  (buildBlock
    name: (string)
    (recipe
      (run
        (string
          (interpolation
            (exp
              (identifier))))))))

===
Override
===
build "override" {
  env "MY_ENV" = "override"
  run "write-env MY_ENV <out>"
}
---

(source_file
  (buildBlock
    name: (string)
    (recipe
      (setEnv
        (string)
        (exp
          (string)))
      (run
        (string
          (interpolation
            (exp
              (identifier))))))))

===
OverrideInReceipe
===
build "override-in-recipe" {
    run {
        env "MY_ENV" = "override-in-recipe"
        shell "write-env MY_ENV <out>"
    }
}
---

(source_file
  (buildBlock
    name: (string)
    (recipe
      (run
        (runBlock
          (setEnv
            (string)
            (exp
              (string)))
          (shell
            (exp
              (string
                (interpolation
                  (exp
                    (identifier)))))))))))

===
RemoveInRecipe
===
build "remove-in-recipe" {
    run {
        env-remove "MY_ENV"
        shell "write-env MY_ENV <out>"
    }
}
---

(source_file
  (buildBlock
    name: (string)
    (recipe
      (run
        (runBlock
          (envRemove
            (string))
          (shell
            (exp
              (string
                (interpolation
                  (exp
                    (identifier)))))))))))
