Closed vityaman closed 1 month ago
I worked with C++ many years but then moved on to TypeScript, so I didn't spend time on a C++ port of my TS code. Someone else contributed it, but as you see with no tests or any GH integration. So a full port would certainly be welcome. However, I can't say how popular the C++ port actually is, since it only lives in this repo with no distribution channel which would allow to see interest by watching download numbers (like I can do with the TS code and NPM).
But if you need a better port and you feel like doing it then please go ahead! I'm ready to accept a PR.
CodeCompletionCore
tests from the original library.clang-format
, clang-tidy
checks.Before closing this issue I would like to do some refactoring a little, because there seem to be minor flaws (unnecessary copying, for example, since the code was translated from TypeScript).
Proposed feature
I propose to initialize a
CMake
project in theports/cpp
directory, add some testing framework as well asANTLRv4
dependency. Then portJava
tests withExpr.g4
there to begin with. Also addclang-format
withclang-tidy
for some quality checks. And finally run it viaGitHub Workflow
on every pull requests in that directory.I can do it fully by myself till the end of August, but need an approval to get started, to be sure that someone needs it.
Motivation
I tried a
C++
port of this library and really liked it, thanks to you and other contributors for your nice work.But there are some small drawbacks in
C++
port currently. It's not really important what they are, but I'll give you two just as an example. The first is that the library itself is not thread safe because of using static variables here. The second is that there is some redundant check here, becausestd::map<K, V>::operator[]
will insert a default-constructibleV
when called on an absent key.I would like to fix it, but now there are no tests for this target and even simplest workflow that checks build status, and because of it contributing is hard and error-prone.