|
1 | 1 | const Keywords = {
|
2 | 2 | TRUE: ['true', 'pravda', 'wahr'],
|
3 |
| - FALSE: ['false', 'nepravda', 'unwahr'], |
| 3 | + FALSE: ['false', 'nepravda', 'falsch'], |
4 | 4 | IF: ['if', 'pokud', 'falls'],
|
5 | 5 | ELSE: ['else', 'jinak', 'sonst'],
|
6 | 6 | WHILE: ['while', 'dokud', 'solange'],
|
@@ -227,6 +227,7 @@ class BiOperator extends Operator {
|
227 | 227 | this.isBi = true
|
228 | 228 | this.precedence = this.getPrecedence()
|
229 | 229 | this.isAddition = '+' === op
|
| 230 | + this.isShortCircuit = '&' === op || '|' === op |
230 | 231 | this.source = source
|
231 | 232 | }
|
232 | 233 | apply(a, b) {
|
@@ -449,7 +450,7 @@ class LangArray extends LangValueObject {
|
449 | 450 | element(indexes, newValue) {
|
450 | 451 | return indexes.reduce((a,c,i) => {
|
451 | 452 | const index = Math.ceil(c.value)
|
452 |
| - if (index < 0 || index >= a.value.length) throw new LangError(Errors.ARRAY_INDEX_OUT_BOUNDS) |
| 453 | + if (index < 0 || index >= a.value.length) throw new LangError(Errors.ARRAY_INDEX_OUT_BOUNDS, null, index) |
453 | 454 | const v = a.value[index]
|
454 | 455 | // set the value for the last element
|
455 | 456 | if (newValue && i === indexes.length - 1)
|
|
0 commit comments