VB.Net, C#: fix cmd line arg handling with --raw
[jackhill/mal.git] / vb / step0_repl.vb
1 Imports System
2 Imports Mal
3
4 Namespace Mal
5 Class step0_repl
6 ' read
7 Shared Function READ(str As String) As String
8 Return str
9 End Function
10
11 ' eval
12 Shared Function EVAL(ast As String, env As String) As String
13 Return ast
14 End Function
15
16 ' print
17 Shared Function PRINT(exp As String) As String
18 Return exp
19 End Function
20
21 ' repl
22 Shared Function REP(str As String, env As String) As String
23 Return PRINT(EVAL(READ(str), env))
24 End Function
25
26 Shared Function Main As Integer
27 Dim prompt As String = "user> "
28 Dim line As String
29
30 Do
31 line = Mal.readline.Readline(prompt)
32 If line is Nothing Then
33 Exit Do
34 End If
35 If line = "" Then
36 Continue Do
37 End If
38 Console.WriteLine(REP(line, ""))
39 Loop While True
40 Return 0
41 End function
42 End Class
43 End Namespace