Carpet

Carpet

2M Downloads

CarpetExpression.getExpr() and Expression.eval() are package-private

silversquirl opened this issue ยท 1 comments

commented

This makes it impossible to create extensions that interact with scarpet directly without going through methods like CarpetExpression.scriptRunCommand.
My current workaround is to create a class inside the carpet.script package that exposes the methods publicly, which is a massive hack.
Of course, it could be the case that I'm missing something and using these methods directly isn't actually needed.

commented

As explained on discord, the reason for that is that I put scarpet docs along the code, which makes mainaining docs easier. I also have a hacky class Expression Inspector in that package for the same reason. I am fine with moving docs outside to some more appropriate location, but other advantage of using javadoc is that they are exposed on https://gnembon.github.io/scarpet/ in the form of html documentation. The easiest solution right now would be to move out docs to its own dummy .java files, keeping the javadoc format, and this could be further converted to md files and viewed / linked directly on github. It just requires some work.