/** * Matches the JSONPath tokens referenced by an expression. * * Shared by `EvaluateExpression._renderTask` (which binds the tokens) and by the * string-literal scan below (which detects them), so the two never drift apart. */ export declare const PATH_PATTERN: RegExp; /** * Finds referenced JSONPath tokens written as literal text inside a string or template * literal, tagged by the kind of literal they sit in. * * At runtime the eval Lambda only resolves a path used as code (e.g. inside a `${...}` * interpolation or as a function argument). A path written as plain literal text never * resolves and would silently evaluate to the wrong value, so surfacing these lets the * construct fail fast at synth. This is a convenience check, not a strict guarantee: the * Lambda binds every referenced path as data regardless of where it appears. * * Detection is a single state-machine pass over five contexts (code, single-quoted string, * double-quoted string, template text, and regex literal). A `${...}` interpolation is treated * as code (a `templateExpression` frame), with a brace-depth stack so nested braces and * templates are handled, and an escaped delimiter never closes its literal. Inside a regex * literal, the scanner just walks over each character until the closing `/` - a path or a * quote in there is not looked at, so it is neither flagged nor able to open a string. * * Each row shows the raw `expression` value; any quote or backtick shown is part of the * expression itself. * * ```text * $.a + $.b -> [] (code) * JSON.parse($.body) -> [] (code) * `year=${$.year}` -> [] (interpolation) * 'year=$.year' -> [$.year] (plain string) * "hello $.user" -> [$.user] (plain string) * `total: $.n` -> [$.n] (template text) * JSON.parse('$.a').concat('$.b') -> [$.a, $.b] (paths in quoted args) * "key='$.a'" -> [$.a] (single quotes literal inside a double-quoted string) * ``` */ export declare function pathsInsideStringLiterals(expression: string): Array<{ path: string; context: 'plainString' | 'templateText'; }>;