-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kotlin: add basic regex parser #2769
Conversation
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
# USA. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a URL for the language reference page of Kotlin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Thank you for your contribution. Knowing some writing a parser with mtable-regex that I designed is my greatest pleasure. Though I don't know Kotlin, the parser looks good. I'm always surprised that people write a parser by reading the documents written in my bad English:-) I will take more time to verify the consistency of the transition between tables. Have you tried to fill scope fields? Here is an example illustrating the concept of scope. struct point {
int x;
int y;
}; tags output:
Could you recommend to me a larger open-source software project using Kotlin? |
Thank you for your quick replies @masatake. English is not my first language either, but your documentation is great. It was quite easy to follow, considering how extensive the ctags options are. I think, without the mtable-regex it would be almost impossible to write the parser for Kotlin. Switching contexts makes it much easier. Regarding the scopes: I've been looking into it, but it's not going to be easy. Kotlin allows nested definitions (for both classes and functions) and often uses anonymous constructs (lot of lambdas, but also anonymous classes) so tracking the scope will be tricky. Therefore I chose to submit this simpler version first and maybe try to add scope later. For the codebase, I can recommend you for eaxmple dokka, which is a documentation engine for Kotlin. It's not really large, but I can't think of any better example right now... Most of the Kotlin usage is still for Android apps, which I don't know much. I'm a back-end developer, using Kotlin for proprietary servers. |
0fe7e39
to
eeb6227
Compare
Follow up from universal-ctags/ctags#2769. After some research it seems that Kotlin itself is still the biggest opensource project written in Kotlin.
I'll inspect the reason of the failure. |
Could you add "Kotlin" to https://github.com/universal-ctags/ctags/blob/master/docs/news.rst ? |
eeb6227
to
9632a36
Compare
Codecov Report
@@ Coverage Diff @@
## master #2769 +/- ##
==========================================
+ Coverage 87.11% 87.13% +0.01%
==========================================
Files 192 193 +1
Lines 40892 40941 +49
==========================================
+ Hits 35625 35674 +49
Misses 5267 5267
Continue to review full report at Codecov.
|
Thank you. |
Closes preservim#632 Support for kotlin type was recently added into universal ctags (universal-ctags/ctags#2769) Currently there is no scope information in the ctags definition. So the `scope2kind` and `kind2scope` settings are not functional. If support is added, then these definitions can be updated to include that info. Note: these kind definitions are based on the output from `ctags --list-kinds=kotlin` which is slightly different than the definitions provided in preservim#632. So this may not be fully compatible with the custom ctags configuration from that issue. The default definition for univercal ctags should be used instead.
Closes #632 Support for kotlin type was recently added into universal ctags (universal-ctags/ctags#2769) Currently there is no scope information in the ctags definition. So the `scope2kind` and `kind2scope` settings are not functional. If support is added, then these definitions can be updated to include that info. Note: these kind definitions are based on the output from `ctags --list-kinds=kotlin` which is slightly different than the definitions provided in #632. So this may not be fully compatible with the custom ctags configuration from that issue. The default definition for univercal ctags should be used instead.
Closes preservim#632 Support for kotlin type was recently added into universal ctags (universal-ctags/ctags#2769) Currently there is no scope information in the ctags definition. So the `scope2kind` and `kind2scope` settings are not functional. If support is added, then these definitions can be updated to include that info. Note: these kind definitions are based on the output from `ctags --list-kinds=kotlin` which is slightly different than the definitions provided in preservim#632. So this may not be fully compatible with the custom ctags configuration from that issue. The default definition for univercal ctags should be used instead.
Hello,
I'm a Kotlin programmer using Geany as my IDE and for a long time I've been missing support this wonderful language. I've got some spare free time around Christmas, so I've decided to try and add a simple regex parser for Kotlin. Also, others have requested support for Kotlin in #1566.
I have tried to read all the docs related to contributions, but it is quite extensive and I'm pretty sure that I must have missed some parts 🙂 Please let me know if there is something missing from the code, before it could be merged. I'll try to fix any imperfections ASAP.