Where can I find a library that parses source code and is able to extract the scope of where your cursor is currently in the code?
Posted
by
Anthony
on Stack Overflow
See other posts from Stack Overflow
or by Anthony
Published on 2012-03-28T17:25:02Z
Indexed on
2012/03/30
5:30 UTC
Read the original article
Hit count: 234
textmate
|sublimetext
In SublimeText(2), when you press [ctrl + shift + p] (mac osx) you are shown a scope of where your caret/cursor is in the source code at the given moment e.g.: entity.name.tag.inline.any.html meta.tag.inline.any.html text.html.basic
I am curious about what library or script is used to parse the document/file and create that scope string.
A sidenote: Typing view.syntax_name(view.sel()[0].b)
into Sublime's console will output the scope as well.
© Stack Overflow or respective owner