HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/www/quadcode/node_modules/sucrase/dist/types/parser/tokenizer/state.d.ts
import type { Token } from "./index";
import { ContextualKeyword } from "./keywords";
import { type TokenType } from "./types";
export declare class Scope {
    startTokenIndex: number;
    endTokenIndex: number;
    isFunctionScope: boolean;
    constructor(startTokenIndex: number, endTokenIndex: number, isFunctionScope: boolean);
}
export declare class StateSnapshot {
    readonly potentialArrowAt: number;
    readonly noAnonFunctionType: boolean;
    readonly inDisallowConditionalTypesContext: boolean;
    readonly tokensLength: number;
    readonly scopesLength: number;
    readonly pos: number;
    readonly type: TokenType;
    readonly contextualKeyword: ContextualKeyword;
    readonly start: number;
    readonly end: number;
    readonly isType: boolean;
    readonly scopeDepth: number;
    readonly error: Error | null;
    constructor(potentialArrowAt: number, noAnonFunctionType: boolean, inDisallowConditionalTypesContext: boolean, tokensLength: number, scopesLength: number, pos: number, type: TokenType, contextualKeyword: ContextualKeyword, start: number, end: number, isType: boolean, scopeDepth: number, error: Error | null);
}
export default class State {
    potentialArrowAt: number;
    noAnonFunctionType: boolean;
    inDisallowConditionalTypesContext: boolean;
    tokens: Array<Token>;
    scopes: Array<Scope>;
    pos: number;
    type: TokenType;
    contextualKeyword: ContextualKeyword;
    start: number;
    end: number;
    isType: boolean;
    scopeDepth: number;
    /**
     * If the parser is in an error state, then the token is always tt.eof and all functions can
     * keep executing but should be written so they don't get into an infinite loop in this situation.
     *
     * This approach, combined with the ability to snapshot and restore state, allows us to implement
     * backtracking without exceptions and without needing to explicitly propagate error states
     * everywhere.
     */
    error: Error | null;
    snapshot(): StateSnapshot;
    restoreFromSnapshot(snapshot: StateSnapshot): void;
}