aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/host
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/host')
-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 "")))))