File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ import net/http!
22import io!
33
44
5- url $= "http://letsgosky.social"!
5+ url <- "http://letsgosky.social"!
66try [
77 // this is a commment, this gets sent to the transpiled version too
8- response $= http::Get(url)!
9- body := io::ReadAll(response.Body)!
8+ response <- http::Get(url)!
9+ body <- io::ReadAll(response.Body)!
1010 print("Response Status: " + response.Status)!
1111 print("Response Body: " + string(body))!
1212] catch err [
Original file line number Diff line number Diff line change @@ -18,14 +18,6 @@ func NewTranspiler(source string) *Transpiler {
1818 }
1919}
2020
21- /*
22- func (t *Transpiler) generateHeader() {
23- t.output.WriteString("// Generated by Blaze Transpiler\n")
24- t.output.WriteString(fmt.Sprintf("// Current Date and Time (UTC): %s\n", time.Now().UTC().Format("2006-01-02 15:04:05")))
25- t.output.WriteString("package main\n\n")
26-
27- }
28- */
2921func (t * Transpiler ) processLine (line string ) string {
3022
3123 if strings .HasPrefix (line , "print(" ) {
@@ -52,7 +44,7 @@ func (t *Transpiler) processLine(line string) string {
5244 line = strings .ReplaceAll (line , ";" , "!" )
5345 line = strings .ReplaceAll (line , "[" , "{" )
5446 line = strings .ReplaceAll (line , "]" , "}" )
55- line = strings .ReplaceAll (line , "$= " , ":=" )
47+ line = strings .ReplaceAll (line , "<- " , ":=" )
5648
5749 // Handle imports
5850 if strings .HasPrefix (line , "import " ) {
You can’t perform that action at this time.
0 commit comments