diff options
| author | dgp@users.sourceforge.net <dgp> | 2006-11-05 03:33:56 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2006-11-05 03:33:56 (GMT) |
| commit | 954f38d22e0fbc3b7dae1563e0ae9ddfbf279add (patch) | |
| tree | 264ef29653c5c4d643fcd6144b7e8d438c41b036 /generic/tclParseExpr.c | |
| parent | 1d476e8d861af1d0bab33ac3cb5ef653eeb9ee52 (diff) | |
| download | tcl-954f38d22e0fbc3b7dae1563e0ae9ddfbf279add.zip tcl-954f38d22e0fbc3b7dae1563e0ae9ddfbf279add.tar.gz tcl-954f38d22e0fbc3b7dae1563e0ae9ddfbf279add.tar.bz2 | |
TIP#274 IMPLEMENTATION
* generic/tclParseExpr.c: Exponentiation operator is now
* tests/expr.test: right associative. [Patch 1556802]
Diffstat (limited to 'generic/tclParseExpr.c')
| -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 */ |
