package pingis.utils;

import com.github.javaparser.JavaParser;
import com.github.javaparser.ParseProblemException;
import com.github.javaparser.ast.CompilationUnit;

/**
 * Created by dwarfcrank on 7/21/17.
 */
public class JavaSyntaxChecker {

    public static String[] parseCode(String code) {
        try {
            CompilationUnit cu = JavaParser.parse(code);
        } catch (ParseProblemException parseProblems) {
            return parseProblems.getProblems().stream().map((prob) ->
                    prob.getVerboseMessage()
                ).toArray(String[]::new);
        }

        return null;
    }
}

@@ -164,16 +164,70 @@
 t;%0A%0A/**%0A
+ * Helper class for checking the syntax of Java code.%0A
  * Creat
@@ -293,16 +293,336 @@
 cker %7B%0A%0A
+    /**%0A     * Parses the code to check its syntax.%0A     * @param code Code to parse. Expects a whole Java compilation unit (i.e. package declarations/imports, class%0A     *             definitions, etc.).%0A     * @return Array of strings describing the encountered parse errors, or null if the syntax is correct.%0A     */%0A
     publ

Add JavaDoc for JavaSyntaxChecker.