From 0f228d2d25f292b7d841c84cfa8b8f02229c993a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Sep 2017 00:09:54 -0700 Subject: 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. --- core.nom | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'core.nom') diff --git a/core.nom b/core.nom index 3b0cf32..830e312 100644 --- a/core.nom +++ b/core.nom @@ -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, "))"] -- cgit v1.2.3