syntax-ppss-toplevel-pos

syntax-ppss-toplevel-pos is a compiled Lisp function in `syntax.el'.

(syntax-ppss-toplevel-pos PPSS)

Get the latest syntactically outermost position found in a syntactic scan.
PPSS is a scan state, as returned by `parse-partial-sexp' or `syntax-ppss'.
An "outermost position" means one that it is outside of any syntactic entity:
outside of any parentheses, comments, or strings encountered in the scan.
If no such position is recorded in PPSS (because the end of the scan was
itself at the outermost level), return nil.