aboutsummaryrefslogtreecommitdiff
path: root/test/lang.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-12 13:09:31 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-12 13:09:31 -0400
commit6c01eef851439549018267fdc439e4884af0c624 (patch)
tree0599dd071b8a5effb67e6a87ed1c34777eb8d8c7 /test/lang.tm
parent17cb6ffd88c4464c513b045f4b06c4e6e46e8f22 (diff)
Introducing the main() function
Diffstat (limited to 'test/lang.tm')
-rw-r--r--test/lang.tm27
1 files changed, 14 insertions, 13 deletions
diff --git a/test/lang.tm b/test/lang.tm
index 509a4ec6..ad09b605 100644
--- a/test/lang.tm
+++ b/test/lang.tm
@@ -14,20 +14,21 @@ lang HTML
func paragraph(content:HTML)->HTML
return $HTML{}"<p>{content}</p>"
->> HTML.HEADER
-= $HTML"<!DOCTYPE HTML>"
+func main()
+ >> HTML.HEADER
+ = $HTML"<!DOCTYPE HTML>"
->> user := "I <3 hax"
->> html := $HTML{}"Hello {user}!"
-= $HTML"Hello I &lt;3 hax!"
->> html ++ $HTML{}"<br>"
-= $HTML"Hello I &lt;3 hax!<br>"
+ >> user := "I <3 hax"
+ >> html := $HTML{}"Hello {user}!"
+ = $HTML"Hello I &lt;3 hax!"
+ >> html ++ $HTML{}"<br>"
+ = $HTML"Hello I &lt;3 hax!<br>"
->> $HTML{}"{1 + 2}"
-= $HTML"3"
+ >> $HTML{}"{1 + 2}"
+ = $HTML"3"
->> $HTML{}"{3_i8}"
-= $HTML"3"
+ >> $HTML{}"{3_i8}"
+ = $HTML"3"
->> html:paragraph()
-= $HTML"<p>Hello I &lt;3 hax!</p>"
+ >> html:paragraph()
+ = $HTML"<p>Hello I &lt;3 hax!</p>"