aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang
diff options
context:
space:
mode:
authorEduardo Julian2019-03-05 23:31:33 -0400
committerEduardo Julian2019-03-05 23:31:33 -0400
commit46406645c707db12159ae2c0fc3d7e1446175bbf (patch)
tree9a1a70a0265396832321478b0b66c3308eb452ba /new-luxc/source/luxc/lang
parent412cbffb0e8d127b4f22733b9151c9e738fe7809 (diff)
Got the JS compiler running again.
Diffstat (limited to 'new-luxc/source/luxc/lang')
-rw-r--r--new-luxc/source/luxc/lang/host/python.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux
index 43c8b28a3..aafa07161 100644
--- a/new-luxc/source/luxc/lang/host/python.lux
+++ b/new-luxc/source/luxc/lang/host/python.lux
@@ -236,8 +236,8 @@
(def: nest
(-> Statement Text)
(|>> :representation
- (format "\n")
- (text.replace-all "\n" "\n ")))
+ (format text.new-line)
+ (text.replace-all text.new-line (format text.new-line text.tab))))
(def: #export (set-nth! idx value array)
(-> Expression Expression Expression Statement)
@@ -255,7 +255,7 @@
(:abstraction
(format "if " (expression test) ":"
(nest then!)
- "\n" "else:"
+ text.new-line "else:"
(nest else!))))
(def: #export (when! test then!)
@@ -275,7 +275,7 @@
(-> Statement Statement Statement)
(:abstraction
(format (:representation pre!)
- "\n"
+ text.new-line
(:representation post!))))
(def: #export (while! test body!)
@@ -297,7 +297,7 @@
(def: #export no-op!
Statement
- (:abstraction "\n"))
+ (:abstraction text.new-line))
(type: #export Except
{#classes (List Text)
@@ -311,7 +311,7 @@
(nest body!)
(|> excepts
(list/map (function (_ [classes exception catch!])
- (format "\n" "except (" (text.join-with "," classes)
+ (format text.new-line "except (" (text.join-with "," classes)
") as " (..name exception) ":"
(nest catch!))))
(text.join-with "")))))