• Parse source into an expression and the symbols it needs.

    const e = parseExpression('NIFTY1!/NSE:RELIANCE');
    e.symbols; // ['NIFTY1!', 'NSE:RELIANCE'] -> fetch exactly these

    Throws ExpressionError with the offending character's index, so a search box can underline it. A bare symbol parses too, which lets one code path handle both an ordinary chart and a synthetic one.

    Parameters

    • source: string

    Returns SymbolExpression