public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [olang/patches/.build.yml] build success
  2024-04-18 22:18 [PATCH olang v1] parser: add missing <= and >= binary operators Johnny Richard
@ 2024-04-18 21:22 ` builds.sr.ht
  2024-04-19  1:34 ` [PATCH olang v1] parser: add missing <= and >= binary operators Carlos Maniero
  1 sibling, 0 replies; 3+ messages in thread
From: builds.sr.ht @ 2024-04-18 21:22 UTC (permalink / raw)
  To: Johnny Richard; +Cc: ~johnnyrichard/olang-devel

olang/patches/.build.yml: SUCCESS in 43s

[parser: add missing <= and >= binary operators][0] from [Johnny Richard][1]

[0]: https://lists.sr.ht/~johnnyrichard/olang-devel/patches/51123
[1]: mailto:johnny@johnnyrichard.com

✓ #1199375 SUCCESS olang/patches/.build.yml https://builds.sr.ht/~johnnyrichard/job/1199375

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH olang v1] parser: add missing <= and >= binary operators
@ 2024-04-18 22:18 Johnny Richard
  2024-04-18 21:22 ` [olang/patches/.build.yml] build success builds.sr.ht
  2024-04-19  1:34 ` [PATCH olang v1] parser: add missing <= and >= binary operators Carlos Maniero
  0 siblings, 2 replies; 3+ messages in thread
From: Johnny Richard @ 2024-04-18 22:18 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
 src/parser.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/parser.c b/src/parser.c
index b800870..db862d8 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -126,8 +126,8 @@ typedef enum
     BINOP_BITWISE_OR_PREC,
     BINOP_BITWISE_XOR_PREC,
     BINOP_BITWISE_AND_PREC,
-    BINOP_CMP_EQ_AND_NEQ_PREC,
-    BINOP_CMP_LT_AND_GT_PREC,
+    BINOP_CMP_EQUALITY_PREC,
+    BINOP_CMP_RELATIONAL_PREC,
     BINOP_BITWISE_SHIFT_PREC,
     BINOP_ADDITIVE_PREC,
     BINOP_MULTIPLICATIVE_PREC,
@@ -149,10 +149,12 @@ get_binary_op_precedence(token_kind_t kind)
             return BINOP_BITWISE_SHIFT_PREC;
         case TOKEN_LT:
         case TOKEN_GT:
-            return BINOP_CMP_LT_AND_GT_PREC;
+        case TOKEN_CMP_LEQ:
+        case TOKEN_CMP_GEQ:
+            return BINOP_CMP_RELATIONAL_PREC;
         case TOKEN_EQ:
         case TOKEN_CMP_NEQ:
-            return BINOP_CMP_EQ_AND_NEQ_PREC;
+            return BINOP_CMP_EQUALITY_PREC;
         case TOKEN_AND:
             return BINOP_BITWISE_AND_PREC;
         case TOKEN_CIRCUMFLEX:

base-commit: dc6b44ddd2673a9a377430684ce37a80fbbaace3
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH olang v1] parser: add missing <= and >= binary operators
  2024-04-18 22:18 [PATCH olang v1] parser: add missing <= and >= binary operators Johnny Richard
  2024-04-18 21:22 ` [olang/patches/.build.yml] build success builds.sr.ht
@ 2024-04-19  1:34 ` Carlos Maniero
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maniero @ 2024-04-19  1:34 UTC (permalink / raw)
  To: Johnny Richard, ~johnnyrichard/olang-devel

Applied! Thanks.

To git.sr.ht:~johnnyrichard/olang
   fea5212..62cd484  main -> main

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-19  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 22:18 [PATCH olang v1] parser: add missing <= and >= binary operators Johnny Richard
2024-04-18 21:22 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-04-19  1:34 ` [PATCH olang v1] parser: add missing <= and >= binary operators Carlos Maniero

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox