Closed eschnett closed 7 years ago
@eschnett You know of any projects on Ohloh that have this language?
Yes, e.g. Kranc or "Einstein Toolkit" use Mathematica. Currently, this language is misdiagnosed as Objective C.
Additionally SimulationTools for Mathematica (https://www.ohloh.net/p/simulationtools/analyses/latest/languages_summary) which is also misdiagnosed as Objective C, presumably because the standard file extension is ".m". It would be good if this could be pulled.
Is further work needed for this to be merged? The respective projects still show up incorrectly on OpenHub as being in Objective C rather than in Mathematica.
I'm not aware of further work being necessary. I didn't receive any feedback on the implementation. It may be necessary to rebase the implementation, now after two years of silence.
@eschnett, sorry for the late response. I can help get this merged. This PR needs a little more work with tests. In addition to the file test/expected_dir/mathematica1.m, one needs to add another file at test/src_dir/mathematica1.m which reflects the expected_dir file minus the mathematica ... prefixes. This will enable the test/unit/parser.h test to compare the mathematica parser results.
I have tried adding the test/src_dir/mathematica1.m file and found that the tests fail on file detection. The mathematica files are being detected as objective_c. This is due to a flaw in existing master code. This new PR fixes the problem. After making this change, I found that the tests fail on mathematica comment lines being incorrectly counted as code.
I implemented support for detecting Mathematica as new language. I added a test case as well.