diff options
author | dgp <dgp@users.sourceforge.net> | 2006-11-05 03:33:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-11-05 03:33:56 (GMT) |
commit | b245297bd949029c02f962cebe26f139d860e12d (patch) | |
tree | 264ef29653c5c4d643fcd6144b7e8d438c41b036 /generic | |
parent | f0fce3b27df91a506d77ccc5bfec17437a6f079e (diff) | |
download | tcl-b245297bd949029c02f962cebe26f139d860e12d.zip tcl-b245297bd949029c02f962cebe26f139d860e12d.tar.gz tcl-b245297bd949029c02f962cebe26f139d860e12d.tar.bz2 |
TIP#274 IMPLEMENTATION
* generic/tclParseExpr.c: Exponentiation operator is now
* tests/expr.test: right associative. [Patch 1556802]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclParseExpr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c index d1044fd..6f9103b 100644 --- a/generic/tclParseExpr.c +++ b/generic/tclParseExpr.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParseExpr.c,v 1.46 2006/11/02 15:58:08 dgp Exp $ + * RCS: @(#) $Id: tclParseExpr.c,v 1.47 2006/11/05 03:33:56 dgp Exp $ */ #include "tclInt.h" @@ -521,8 +521,8 @@ Tcl_ParseExpr( break; } - /* Special association rules for the ternary operators */ if (prec[otherPtr->lexeme] == precedence) { + /* Special association rules for the ternary operators. */ if ((otherPtr->lexeme == QUESTION) && (lastOrphanPtr->lexeme != COLON)) { break; @@ -531,6 +531,10 @@ Tcl_ParseExpr( && (nodePtr->lexeme == QUESTION)) { break; } + /* Right association rules for exponentiation. */ + if (nodePtr->lexeme == EXPON) { + break; + } } /* Some checks before linking */ |