aboutsummaryrefslogtreecommitdiff
path: root/test/lang.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-09 13:26:28 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-09 13:26:28 -0400
commit074cf22ad462eafe963e4a749b2b74cab51211a1 (patch)
treee1d7f938f2d949cc5dcf67ca648f200663e36562 /test/lang.tm
parent47fca946065508cff4151a32b3008c161983fd9d (diff)
Change function syntax from `func(args)->ret` to `func(args -> ret)`
Diffstat (limited to 'test/lang.tm')
-rw-r--r--test/lang.tm6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lang.tm b/test/lang.tm
index 9a05eb11..b30bcbea 100644
--- a/test/lang.tm
+++ b/test/lang.tm
@@ -1,6 +1,6 @@
lang HTML:
HEADER := $HTML"<!DOCTYPE HTML>"
- func escape(t:Text)->HTML:
+ func escape(t:Text->HTML):
t = t:replace_all({
$/&/: "&amp;",
$/</: "&lt;",
@@ -11,10 +11,10 @@ lang HTML:
return HTML.without_escaping(t)
- func escape_int(i:Int)->HTML:
+ func escape_int(i:Int->HTML):
return HTML.without_escaping("$i")
- func paragraph(content:HTML)->HTML:
+ func paragraph(content:HTML->HTML):
return $HTML"<p>$content</p>"
func main():