narrat 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/narrat.es.js +4398 -4352
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +81 -81
- package/dist/narrat.umd.js.map +1 -1
- package/dist/vm/commands/if.d.ts +5 -0
- package/dist/vm/vm-helpers.d.ts +1 -1
- package/dist/vm/vm-parser.d.ts +1 -0
- package/package.json +1 -1
package/dist/vm/commands/if.d.ts
CHANGED
|
@@ -3,8 +3,13 @@ import { Parser } from '../../types/parser';
|
|
|
3
3
|
export interface IfOptions {
|
|
4
4
|
condition: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface ElseIfOptions {
|
|
7
|
+
branch: Parser.Branch;
|
|
8
|
+
condition: Parser.ParsedExpression;
|
|
9
|
+
}
|
|
6
10
|
export interface IfStaticOptions {
|
|
7
11
|
success: Parser.Branch;
|
|
12
|
+
elseifs: ElseIfOptions[];
|
|
8
13
|
failure?: Parser.Branch;
|
|
9
14
|
}
|
|
10
15
|
export declare const ifCommand: CommandPlugin<IfOptions, IfStaticOptions>;
|
package/dist/vm/vm-helpers.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface SkillCheckParams {
|
|
|
10
10
|
repeatable?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare function runSkillCheck(params: SkillCheckParams): SkillCheckState;
|
|
13
|
-
export declare function runConditionCommand(command: Parser.Command<IfOptions, IfStaticOptions
|
|
13
|
+
export declare function runConditionCommand(command: Parser.Command<IfOptions, IfStaticOptions>, elseIfResults?: boolean[]): Parser.Branch | undefined;
|
|
14
14
|
export declare function isExpression(arg: Parser.Arg): arg is Parser.ParsedExpression;
|
|
15
15
|
export type Variable = string | number | boolean | undefined | null;
|
|
16
16
|
export declare function isVariable(arg: Parser.Arg): arg is Variable;
|
package/dist/vm/vm-parser.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface ParserContext {
|
|
|
10
10
|
indentSize: number;
|
|
11
11
|
}
|
|
12
12
|
export declare function parseScript(errorHandler: ParserErrorHandler, code: string, fileName: string): Parser.ParsedScript;
|
|
13
|
+
export declare function parseExpression(ctx: ParserContext, line: Parser.Line, expression: Parser.Expression): Parser.ParsedExpression;
|
|
13
14
|
export declare function parseCodeLine(ctx: ParserContext, codeToProcess: string): Parser.Expression;
|
|
14
15
|
export declare function parseCodeLineIntoTokens(code: string): Parser.Primitive[];
|
|
15
16
|
export declare function splitIntoTokens(code: string): Parser.Primitive[];
|