Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
when calling (syntax-ppss) at the end of the Python snippet below, it yields
(1 6 7 34 nil nil 0 nil 8 (6) nil)
whereas nth 1 --depth in parens--, should tell "2", as the opening
curly bracket should count too:
---
print(f"Addition: {m1 + m2
---
The 34 says that the point is inside a string, more precisely, this is
the character that will terminate the string[1] -- in this case " which
has the codepoint 34. The parser doesn't count the depth in parens
inside strings. Emacs sees only one open parentheses, and that in
buffer position 6.
Best, Arash
Footnotes:
[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Parser-State.html