aboutsummaryrefslogtreecommitdiff
path: root/examples/sample_code.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-14 00:09:54 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-14 00:09:54 -0700
commit0f228d2d25f292b7d841c84cfa8b8f02229c993a (patch)
tree9aa4b94eeb8497e2ded9fbc3723e5f94a21bdd5d /examples/sample_code.nom
parent6b5fbd436bb5caf99b152dfa418317dfc1fca272 (diff)
Changed comments to use # and #.. instead of (# #), which is more
consistent with the language's attitude towards code blocks and indentation. No more long-range action closing parens.
Diffstat (limited to 'examples/sample_code.nom')
-rw-r--r--[-rwxr-xr-x]examples/sample_code.nom15
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/sample_code.nom b/examples/sample_code.nom
index c8b48f7..63078d7 100755..100644
--- a/examples/sample_code.nom
+++ b/examples/sample_code.nom
@@ -1,18 +1,21 @@
-(# This is just a comment #)
-(# Nested comments (# like this #) work fine #)
+# This is just a comment
+#.. Block comments
+ start with a #.. and
+ continue until dedent
+
run file "core.nom"
say "foo"
say (4)
-(# "rule" is just a function that takes a function call spec and a block of code to run,
- and stores the function definition #)
+#.. "rule" is just a function that takes a function call spec and a block of code to run,
+ and stores the function definition
rule "fart": say "poot"
fart
-(# multi-line strings: #)
+# multi-line strings:
say ".."
| Once upon a time
|there was a very
@@ -30,7 +33,7 @@ say ".."
|(done)
|
-rule "doublefart": (# this farts twice #)
+rule "doublefart": # this farts twice
say "poot"
say "poot"