Fix order of variables in error message.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 17 Feb 2025 17:39:54 +0000 (09:39 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 17 Feb 2025 17:39:54 +0000 (09:39 -0800)
Thanks to Frans Houweling for reporting the bug.

src/language/lexer/variable-parser.c
tests/language/commands/matrix.at

index 2977c2fb7616106cdc5664239506317c3403105a..1a71065aead8ea748d56792ea823fb7f51894da9 100644 (file)
@@ -355,7 +355,7 @@ parse_var_set_vars (struct lexer *lexer, const struct var_set *vs,
                   const char *last_name = var_get_name (last_var);
                   lex_ofs_error (lexer, start_ofs, end_ofs,
                                  _("%s TO %s is not valid syntax since %s "
-                                   "precedes %s in the dictionary."),
+                                   "is after %s in the dictionary."),
                                  first_name, last_name, first_name, last_name);
                   goto fail;
                 }
@@ -867,7 +867,7 @@ var_syntax_evaluate (struct lexer *lexer,
         {
           lex_ofs_error (lexer, first_ofs, last_ofs,
                          _("%s TO %s is not valid syntax since %s "
-                           "precedes %s in the dictionary."),
+                           "is after %s in the dictionary."),
                          vs[i].first, vs[i].last,
                          vs[i].first, vs[i].last);
           goto error;
index 219394af70862966880682a9896f6b15af2cc367..91222ad8bc8dbd803d6d67124932b33960e66913 100644 (file)
@@ -3998,8 +3998,8 @@ matrix.sps:22.17: error: MATRIX: x is not a variable name.
    22 | GET x/VARIABLES=x.
       |                 ^
 
-matrix.sps:23.17-23.22: error: MATRIX: c TO a is not valid syntax since c
-precedes a in the dictionary.
+matrix.sps:23.17-23.22: error: MATRIX: c TO a is not valid syntax since c is
+after a in the dictionary.
    23 | GET x/VARIABLES=c TO a.
       |                 ^~~~~~