Adds support for Paralithic let expressions (currently in Paralithic dev awaiting proper release). Let expressions enable the ability to bind names to expressions within the context of another expression, e.g.
5 + let
a := 3.5,
b := a^2, // Optional trailing comma
in a * b * (let d := sqrt(x) in cos(d))
As the introduction of let expressions may break config packs and the noise predicate addon (which uses the in invocation variable reserved as a keyword in let expressions), this must explicitly be enabled in pack.yml via the following:
The noise predicate addon will use input instead of in if let expressions are enabled, which currently affects only the EXPRESSION_NORMALIZER sampler.
Checklist
Mandatory checks
[x] The base branch of this PR is an unreleased version branch (that has a ver/ prefix)
or is a branch that is intended to be merged into a version branch.
[x] There are no already existing PRs that provide the same changes.
[x] The PR is within the scope of Terra (i.e. is something a configurable terrain generator should be doing).
[ ] Changes follow the code style for this project. Code style can be applied prior to version branch merge
[x] I have read the CONTRIBUTING.md
document in the root of the git repository.
Types of changes
[ ] Bug Fix
[ ] Build system
[ ] Documentation
[x] New Feature
[ ] Performance
[ ] Refactoring
[ ] Repository
[ ] Revert
[ ] Style
[ ] Tests
[ ] Translation
Compatibility
[ ] Introduces a breaking change
[x] Introduces new functionality in a backwards compatible way.
[ ] Introduces bug fixes
Documentation
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly. TODO once version is merged
Testing
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
Licensing
[x] I am the original author of this code, and I am willing to
release it under GPLv3.
[ ] I am not the original author of this code, but it is in public domain or
released under GPLv3 or a compatible license.
Pull Request
Description
Adds support for Paralithic let expressions (currently in Paralithic dev awaiting proper release). Let expressions enable the ability to bind names to expressions within the context of another expression, e.g.
As the introduction of let expressions may break config packs and the noise predicate addon (which uses the
in
invocation variable reserved as a keyword in let expressions), this must explicitly be enabled inpack.yml
via the following:The noise predicate addon will use
input
instead ofin
if let expressions are enabled, which currently affects only theEXPRESSION_NORMALIZER
sampler.Checklist
Mandatory checks
ver/
prefix) or is a branch that is intended to be merged into a version branch.CONTRIBUTING.md
document in the root of the git repository.Types of changes
Compatibility
Documentation
Testing
Licensing