Make the REPL prompt a clickable mode toggle between JavaScript and r2; ":", ":r2" and ":js" switch from the keyboard. Carry the language on REPLCell and REPLResult, route r2 input through the session disassembler, and render output as a JSInspectValue tree for JSON commands or ANSI-parsed styled text otherwise.
7 lines
121 B
Swift
7 lines
121 B
Swift
import Foundation
|
|
|
|
public enum REPLLanguage: String, Codable, Sendable, CaseIterable {
|
|
case javascript
|
|
case r2
|
|
}
|