v1.5.5-SNAPSHOT started. compile if support
This commit is contained in:
1 parent
214f1aec9e
commit
671583638b
7 files changed
+467
-3
No files matched your search
@@ -132,6 +132,9 @@ Primary sources used: `lynglib/src/commonMain/kotlin/net/sergeych/lyng/{Parser,T
|
||||
|
||||
## 6. Control Flow
|
||||
- `if` is expression-like.
|
||||
- `compile if (cond) { ... } else { ... }` is a compile-time-only conditional.
|
||||
- current condition grammar is restricted to `defined(NameOr.Package)`, `!`, `&&`, `||`, and parentheses.
|
||||
- the untaken branch is skipped by the compiler and is not name-resolved or type-checked.
|
||||
- `when(value) { ... }` supported.
|
||||
- branch conditions support equality, `in`, `!in`, `is`, `!is`, and `nullable` predicate.
|
||||
- `when { ... }` (subject-less) is currently not implemented.
|
||||
|
||||
Reference in new issue
Block a user