asajs 4.0.4 → 4.0.6-indev

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.
@@ -5,3 +5,4 @@ export declare function isHexChar(char: string): boolean;
5
5
  export declare function isBinaryChar(char: string): boolean;
6
6
  export declare function isOctalChar(char: string): boolean;
7
7
  export declare function isCompileBinding(input: string): boolean;
8
+ export declare function isHasBinding(input: string): boolean;
@@ -1,8 +1,9 @@
1
1
  import { Expression, GenBinding } from "./types.js";
2
- type Callback = (...args: Expression[]) => {
2
+ type CallbackRet = {
3
3
  genBindings?: GenBinding[];
4
4
  value: Expression;
5
5
  };
6
+ type Callback = (...args: Expression[]) => CallbackRet;
6
7
  export declare const FunctionMap: Map<string, Callback>;
7
8
  export declare const defaultFunctions: {
8
9
  /**
@@ -41,13 +42,25 @@ export declare const defaultFunctions: {
41
42
  }[];
42
43
  value: `#${string}`;
43
44
  };
44
- /**
45
- * Returns the square root of a number.
46
- * @param number
47
- * @returns
48
- */
49
- sqrt: (number: string) => {
45
+ sqrt: (input: string) => {
46
+ genBindings: {
47
+ source: string;
48
+ target: `#${string}`;
49
+ }[];
50
+ value: `#${string}`;
51
+ };
52
+ cache_value: (cache_binding: string, override_binding: string, is_read: string) => {
53
+ value: string;
54
+ };
55
+ vector_length: (x: string, y: string, z: string) => {
50
56
  genBindings: GenBinding[];
57
+ value: string;
58
+ };
59
+ strlen: (str: string) => {
60
+ genBindings: {
61
+ source: string;
62
+ target: `#${string}`;
63
+ }[];
51
64
  value: `#${string}`;
52
65
  };
53
66
  /**
@@ -56,6 +69,7 @@ export declare const defaultFunctions: {
56
69
  * @returns
57
70
  */
58
71
  translatable: (key: string) => {
72
+ genBindings: never[];
59
73
  value: string;
60
74
  };
61
75
  /**
@@ -17,6 +17,7 @@ export declare class Parser {
17
17
  eat(): Token;
18
18
  last(): Token;
19
19
  private parseExpression;
20
+ private parseBinaryExpression;
20
21
  private parseOrExpression;
21
22
  private parseAndExpression;
22
23
  private parseComparisonExpression;
@@ -13,7 +13,7 @@ type CompileBinding = `[${string}]`;
13
13
  export declare function Color(hex: string | number): Array3<number>;
14
14
  export declare function ResolveBinding(cache: Map<string, unknown>, ...bindings: BindingItem[]): BindingItem[];
15
15
  export declare function RandomString(length: number, base?: number): string;
16
- export declare function RandomBindingString(length: number, base?: number): Binding;
16
+ export declare function RandomBindingString(length?: number, base?: number): Binding;
17
17
  export declare function GetItemByAuxID(auxID: number): string | undefined;
18
18
  /**
19
19
  * Return format string binding input
@@ -16,7 +16,8 @@ export interface Control {
16
16
  contained?: Value<boolean>;
17
17
  draggable?: Value<boolean>;
18
18
  follows_cursor?: Value<boolean>;
19
- property_bags?: Value<PropertyBags>;
19
+ property_bag?: Value<PropertyBags>;
20
+ property_bag_for_children?: Value<PropertyBags>;
20
21
  [key: Binding]: Value<any>;
21
22
  [key: Variable]: Value<any>;
22
23
  }