Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: move parsing of function calls out of Con...



details:   https://anonhg.NetBSD.org/src/rev/2555447c510c
branches:  trunk
changeset: 1021629:2555447c510c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jun 11 13:09:10 2021 +0000

description:
make: move parsing of function calls out of CondParser_LeafToken

The grammar above the parsing code says that a Leaf has nothing to do
with function calls, so don't mix these in the actual code.

No functional change.

diffstat:

 usr.bin/make/cond.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r a99457250e57 -r 2555447c510c usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Fri Jun 11 13:01:28 2021 +0000
+++ b/usr.bin/make/cond.c       Fri Jun 11 13:09:10 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.263 2021/06/11 12:23:00 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.264 2021/06/11 13:09:10 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.263 2021/06/11 12:23:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.264 2021/06/11 13:09:10 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -836,9 +836,6 @@
        const char *cp;
        const char *cp1;
 
-       if (CondParser_FuncCall(par, doEval, &t))
-               return t;
-
        /* Push anything numeric through the compare expression */
        cp = par->p;
        if (ch_isdigit(cp[0]) || cp[0] == '-' || cp[0] == '+')
@@ -931,6 +928,8 @@
                return CondParser_Comparison(par, doEval);
 
        default:
+               if (CondParser_FuncCall(par, doEval, &t))
+                       return t;
                return CondParser_LeafToken(par, doEval);
        }
 }



Home | Main Index | Thread Index | Old Index