about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-11-13 21:18:14 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-11-13 21:18:14 +0000
commit35a8612f217f25a37caaed08b31be754cfe584b1 (patch)
tree14c1dcc8b6ae7f732a3c969fef80e498153858ca /Src/lex.c
parentdcd26714bb85b7559ae5342ae95cc30f9a98ce8c (diff)
downloadzsh-35a8612f217f25a37caaed08b31be754cfe584b1.tar.gz
zsh-35a8612f217f25a37caaed08b31be754cfe584b1.tar.xz
zsh-35a8612f217f25a37caaed08b31be754cfe584b1.zip
26042 with some fixes from 26043 (Mikael):
allow <(...) and >(...) to occur in the middle of strings
and =(...) to have extra text following
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 025387ca1..f5999d798 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -835,7 +835,7 @@ gettok(void)
 	return OUTPAR;
     case LX1_INANG:
 	d = hgetc();
-	if (!incmdpos && d == '(') {
+	if (d == '(') {
 	    hungetc(d);
 	    lexstop = 0;
 	    unpeekfd:
@@ -1152,20 +1152,13 @@ gettokstr(int c, int sub)
 		c = Comma;
 	    break;
 	case LX2_OUTANG:
-	    if (!intpos) {
-		if (in_brace_param || sub)
-		    break;
-		else
-		    goto brk;
-	    }
+	    if (in_brace_param || sub)
+		break;
 	    e = hgetc();
 	    if (e != '(') {
 		hungetc(e);
 		lexstop = 0;
-		if (in_brace_param || sub)
-		    break;
-		else
-		    goto brk;
+		goto brk;
 	    }
 	    add(Outang);
 	    if (skipcomm()) {
@@ -1178,7 +1171,7 @@ gettokstr(int c, int sub)
 	    if (isset(SHGLOB) && sub)
 		break;
 	    e = hgetc();
-	    if(e == '(' && intpos) {
+	    if (!(in_brace_param || sub) && e == '(') {
 		add(Inang);
 		if (skipcomm()) {
 		    peek = LEXERR;