[m-rev.] for post-commit review: stop accepting : as module name separator

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Nov 11 03:04:03 AEDT 2022


The one question is: does this need an entry in NEWS?
We switched to using . instead of : as module name separator
in 2003.

Zoltan.

diff --git a/library/mercury_term_parser.m b/library/mercury_term_parser.m
index 8c3d20407..8c2cbe174 100644
--- a/library/mercury_term_parser.m
+++ b/library/mercury_term_parser.m
@@ -666,11 +666,7 @@ parse_backquoted_operator(MaybeQualifier, OpName, VariableTerms,
 parse_backquoted_operator_qualifier(MaybeQualifier0, MaybeQualifier, OpCtxt0,
         OpName0, OpName, !TokensLeft, !PS) :-
     ( if
-        !.TokensLeft =
-            token_cons(name(ModuleSeparator), SepContext, !:TokensLeft),
-        ( ModuleSeparator = "."
-        ; ModuleSeparator = ":"
-        ),
+        !.TokensLeft = token_cons(name("."), SepContext, !:TokensLeft),
         !.TokensLeft = token_cons(name(OpName1), NameContext, !:TokensLeft),
         OpName1 \= "`"
     then
@@ -823,7 +819,6 @@ parse_simple_term(Token, Context, Prec, TermParse, !TokensLeft, !PS) :-
         ( if
             !.TokensLeft = token_cons(close_curly, _Context, !:TokensLeft)
         then
-            % XXX OPS The callee repeats the test above.
             parse_special_atom("{}", TermContext, BaseTermParse,
                 !TokensLeft, !PS)


More information about the reviews mailing list