[GSoC][PATCHv2] userdiff: add builtin driver for kotlin language
- From
Jaydeep P Das <jaydeepjd.8914@gmail.com>
- Date
- Mar 2, 2022, 06:45 UTC
- Message-ID
- <20220302064504.2651079-1-jaydeepjd.8914@gmail.com>
- In-Reply-To
- <20220301070226.2477769-1-jaydeepjd.8914@gmail.com>
Thanks for the review. Yes. As Johannes pointed out, the word_regex was very loose and did not properly tokenise the code.
I have fixed(and added tests) for the following things in this patch:
+= or -= is not split into + = or - = -a or +a is split into 2 tokens(for each)
Since kotlin supports `_` in between digits to improve readability, therefore numbers like `100_000` are single tokens and not broken up by the regex in this patch.
Kotlin also does not support octal literals, and so the regex does not attempt to find it.