Commit 0c782e22 authored by Marc Durdin's avatar Marc Durdin
Browse files

fix(developer): Compiler check for if and nul at start of context

Fixes #4280.

Adds checks to verify that `if()`, `platform()`, `baselayout()` and
`nul` are at the start of the context in the appropriate order.

Adds unit tests to validate these checks.

These are conditions that have been present in earlier versions of
Keyman but not enforced until now. Keyboards that do not meet these
conditions would not work correctly in all circumstances and should be
updated to meet the requirements.

An alternative would have been to reorder the context string but that is
much more complex as manipulation would also have been required for the
output string. The enforced order is logical and reduces confusion in
any case.

Updated documentation coming along shortly.
parent 171b6fac
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment