kdoseptal
This commit is contained in:
parent
228c7b2892
commit
4a47631dc3
@ -138,7 +138,7 @@ function prase(expression: string, i: number, terminators: string[], args: strin
|
||||
escaped = true;
|
||||
break;
|
||||
|
||||
case "[": // RNG vyber
|
||||
case "[": { // RNG vyber
|
||||
let option: string, term: string | undefined;
|
||||
const options: string[] = [];
|
||||
|
||||
@ -151,8 +151,9 @@ function prase(expression: string, i: number, terminators: string[], args: strin
|
||||
ret += options[rand(options.length)];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "<": // RNG cislo
|
||||
case "<": { // RNG cislo
|
||||
let min: string, max: string;
|
||||
[min, i] = prase(expression, i, [","], args);
|
||||
[max, i] = prase(expression, i, [">"], args);
|
||||
@ -166,8 +167,9 @@ function prase(expression: string, i: number, terminators: string[], args: strin
|
||||
ret += rand(imax - imin + 1) + imin;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "{": // ARG
|
||||
case "{": {// ARG
|
||||
let argId: string;
|
||||
[argId, i] = prase(expression, i, ["}"], args);
|
||||
|
||||
@ -182,6 +184,7 @@ function prase(expression: string, i: number, terminators: string[], args: strin
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
for (const terminator of terminators) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user