diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 00:09:54 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 00:09:54 -0700 |
| commit | 0f228d2d25f292b7d841c84cfa8b8f02229c993a (patch) | |
| tree | 9aa4b94eeb8497e2ded9fbc3723e5f94a21bdd5d /core.nom | |
| parent | 6b5fbd436bb5caf99b152dfa418317dfc1fca272 (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 'core.nom')
| -rw-r--r-- | core.nom | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,3 @@ -(# Global import #) lua block ".." |utils = require('utils') @@ -107,12 +106,11 @@ macro "%a or %b or %c or %d": macro "%a mod %b": concat ["(",%a as lua expr," mod ",%b as lua expr,")"] macro "- %a": concat ["-(",%a as lua expr,")"] macro "not %a": concat ["not (",%a as lua expr,")"] -macro "# %a": concat ["#(",%a as lua expr,")"] -(# This does equivalence checking instead of identity checking. #) rule "%a == %b": - lua expr "utils.equivalent(vars.a, vars.b)" -macro "%a != %b": concat ["not (",%a as lua expr," == ",%b as lua expr,")"] + lua expr "((vars.a == vars.b) or utils.equivalent(vars.a, vars.b))" +rule "%a != %b": + lua expr "((vars.a ~= vars.b) or not utils.equivalent(vars.a, vars.b))" rule "say %str": lua block ["print(utils.repr(", %str, "))"] |
