Emacs-D-Mode-Maintainers / Emacs-D-Mode

An Emacs mode for D code.
GNU General Public License v3.0
84 stars 21 forks source link

Use cc-mode syntax parsing for imenu? #94

Closed CyberShadow closed 3 years ago

CyberShadow commented 5 years ago

Regular expressions can only get us so far. E.g. this currently is not in imenu:

void run(Parameter!("foo()") command) {}

Even if we ignore the parameter list, one can still create a type (for the function return type) with pretty much arbitrary tokens.

Perhaps c-find-decl-spots and other related cc-mode machinery could be reused to find declarations with better precision.