about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-02-02 13:47:27 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-02-02 13:47:27 +0100
commita5631bb6cd97f60f61b857ad365b1853ef6aa487 (patch)
treea7fca8c728d4ab029fabc6cebbaba9fa327640b7 /lr.c
parentcd5ea9113c66fca6c7dd49f35188bda8c186dc57 (diff)
downloadlr-a5631bb6cd97f60f61b857ad365b1853ef6aa487.tar.gz
lr-a5631bb6cd97f60f61b857ad365b1853ef6aa487.tar.xz
lr-a5631bb6cd97f60f61b857ad365b1853ef6aa487.zip
allow = instead of ==
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lr.c b/lr.c
index 56f2d77..41054e0 100644
--- a/lr.c
+++ b/lr.c
@@ -287,7 +287,7 @@ parse_op()
 		return EXPR_GE;
 	else if (token(">"))
 		return EXPR_GT;
-	else if (token("=="))
+	else if (token("==") || token("="))
 		return EXPR_EQ;
 	else if (token("!="))
 		return EXPR_NEQ;
@@ -328,7 +328,7 @@ static struct expr *
 parse_type()
 {
 	if (token("type")) {
-		if (token("==")) {  // TODO !=
+		if (token("==") || token("=")) {  // TODO !=
 			struct expr *e = mkexpr(EXPR_TYPE);
 			if (token("b"))
 				e->a.filetype = TYPE_BLOCK;
@@ -494,6 +494,8 @@ parse_strcmp()
 		op = EXPR_STREQI;
 	else if (token("=="))
 		op = EXPR_STREQ;
+	else if (token("="))
+		op = EXPR_STREQ;
 	else if (token("~~~"))
 		op = EXPR_GLOBI;
 	else if (token("~~"))
@@ -542,7 +544,7 @@ parse_mode()
 
 	e->a.prop = PROP_MODE;
 
-	if (token("==")) {
+	if (token("==") || token("=")) {
 		e->op = EXPR_EQ;
 	} else if (token("&")) {
 		e->op = EXPR_ALLSET;