You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but that's very brittle (eg doesn't doesn't work with other types of declarations (eg macros, types, variables, constants etc) and gets fooled by comments.
This is needed for integration with other tools (eg go to declaration)
EDIT
also, finding certain symbols can be tricky, eg: defer which seems like it could be a macro but is instead something magic defined here:compiler/transf.nim ; a tool should be able to find the defnition of these as well, eg using lexer.TokTypeToStr
for starred symbols, this can be tried: nimgrep --ignoreStyle --ext:nim --recursive --oneline "newException\*"
also, need a way to find declarations of symbols defined in blocks, eg enum, type etc.
also, need a way to find definitions of magic symbols, eg:
timotheecour
changed the title
nimgrep option to only search for declarations of a given symbol
[search] nimgrep option to only search for declarations of a given symbol
Aug 1, 2018
I'd like to have an equivalent of D's
dscanner --declaration
(cf https://github.com/dlang-community/D-Scanner), also present in other languages ; I couldn't find it innimgrep
my workaround is to use:
but that's very brittle (eg doesn't doesn't work with other types of declarations (eg macros, types, variables, constants etc) and gets fooled by comments.
This is needed for integration with other tools (eg go to declaration)
EDIT
defer
which seems like it could be a macro but is instead something magic defined here:compiler/transf.nim
; a tool should be able to find the defnition of these as well, eg usinglexer.TokTypeToStr
nimgrep --ignoreStyle --ext:nim --recursive --oneline "newException\*"
also, need a way to find declarations of symbols defined in blocks, eg enum, type etc.
also, need a way to find definitions of
magic
symbols, eg:The text was updated successfully, but these errors were encountered: