@@ -21,20 +21,16 @@ public API() {
2121 *
2222 * <pre>{@code
2323 *
24- * import com.kcl.api.*;
25- * import com.kcl.ast.*;
26- * import com.kcl.util.JsonUtil;
24+ *import com.kcl.api.*;
25+ *import com.kcl.ast.*;
26+ *import com.kcl.util.JsonUtil;
2727 *
28- * // Create an instance of the API class
29- * API api = new API();
30- * // Parse the program by providing the file paths to the API
31- * ParseProgram_Result result = api.parseProgram(
32- * ParseProgram_Args.newBuilder().addPaths("path/to/kcl.k").build()
33- * );
34- * // Print the JSON representation of the AST (Abstract Syntax Tree)
35- * System.out.println(result.getAstJson());
36- * // Deserialize the JSON string into a Program object
37- * Program program = JsonUtil.deserializeProgram(result.getAstJson());
28+ *API api = new API();
29+ *ParseProgram_Result result = api.parseProgram(
30+ * ParseProgram_Args.newBuilder().addPaths("path/to/kcl.k").build()
31+ *);
32+ *System.out.println(result.getAstJson());
33+ *Program program = JsonUtil.deserializeProgram(result.getAstJson());
3834 * }</pre>
3935 *
4036 * @param args the arguments specifying the file paths to be parsed.
@@ -70,8 +66,10 @@ public ParseFile_Result parseFile(ParseFile_Args args) throws Exception {
7066 * result.getSymbolsMap().values().forEach(s -> System.out.println(s));
7167 * }</pre>
7268 *
73- * @param args the arguments specifying the file paths to be parsed and resolved.
74- * @return the result of parsing the program and parse errors, type errors, including
69+ * @param args the arguments specifying the file paths to be parsed and
70+ * resolved.
71+ * @return the result of parsing the program and parse errors, type errors,
72+ * including
7573 * the AST in JSON format and symbol, type and definition information.
7674 * @throws Exception if an error occurs during the remote procedure call.
7775 */
0 commit comments