Closed markov closed 1 year ago
Here is a before - after shot of what parts of the grammar this fixes.
The separation of the operators in their own pattern matching was inspired by the java support: https://github.com/microsoft/vscode/blob/main/extensions/java/syntaxes/java.tmLanguage.json#L910
Here is the sample code if you'd like to test it yourself:
fun main() {
intArrayOf(32, 42, 52).forEach { number ->
when {
number < 42 && number <= 42 -> println("Less than an answer!")
number === 42 && number == 42 -> println("The Answer!")
number !== 42 || number != 42 -> println("Not the Answer!")
!!(number > 42 || number >= 42) -> println("More than an answer!")
}
var n = +number
n = -n
++n++
--n--
n = n|number
n = n&number
n = n * 1 % n / 3 + 3 - 1
n += n
n -= n
n %= n
n *= 6
n /= (1.0 / 7)
for (m in n..number) break
}
}
closes #195
Thanks!
This also fixes places where the language server incorrectly detects single
>
chars on a line as mismatched braces.