Package com.helix.cli.repl
Class HelixRepl
java.lang.Object
com.helix.cli.repl.HelixRepl
Interactive JLine 3 Terminal REPL and HotSpot Bytecode Disassembler for Helix.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHelixRepl(ExecutionContext context) HelixRepl(InputStream in, OutputStream out, ExecutionContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intevalSingle(String expression) Evaluates a single expression and prints the result, used for CLI non-interactive execution.voidhandleInput(String input) voidInitializes JLine 3 Terminal and LineReader with history and autocompletion.booleanvoidloadInitialFile(File file) Loads an initial rule file into the REPL.voidsetDebugMode(boolean debugMode) voidsetDebugSession(DebugSession debugSession) intstart()Starts the interactive REPL event loop.
-
Field Details
-
PROMPT
- See Also:
-
MULTILINE_PROMPT
- See Also:
-
-
Constructor Details
-
HelixRepl
public HelixRepl() -
HelixRepl
-
HelixRepl
-
-
Method Details
-
initTerminal
Initializes JLine 3 Terminal and LineReader with history and autocompletion.- Throws:
Exception
-
start
public int start()Starts the interactive REPL event loop.- Returns:
- exit code (0 for clean termination)
-
evalSingle
Evaluates a single expression and prints the result, used for CLI non-interactive execution. -
loadInitialFile
Loads an initial rule file into the REPL. -
handleInput
-
close
public void close() -
getContext
-
getLastAst
-
getLastExpression
-
getLastResult
-
getDebugSession
-
setDebugSession
-
isDebugMode
public boolean isDebugMode() -
setDebugMode
public void setDebugMode(boolean debugMode)
-