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