Skip to content

Commit

Permalink
sync jssrc.py with JS sources
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Mar 25, 2024
1 parent b07e113 commit 01caa56
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion py/pyaici/jssrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@
*/
function detokenize(tokens: number[]): Buffer;
/**
* Return debug string representation of a given token index
*/
function tokenRepr(token: number): string;
/**
* Return identifier of the current sequence.
* Most useful with fork_group parameter in mid_process() callback.
Expand Down Expand Up @@ -219,20 +224,27 @@ class TokenSet {
*/
constructor();
toString(): string;
add(t: number): void;
delete(t: number): void;
has(t: number): boolean;
clear(): void;
/**
* Number of all tokens (not only in the set).
* Number of all possible tokens (regardless of whether they are in the set or not).
*/
length: number;
/**
* Include or exclude all tokens from the set.
*/
setAll(value: boolean): void;
/**
* Number of tokens in the set.
*/
numSet(): number;
}
/**
Expand Down

0 comments on commit 01caa56

Please sign in to comment.