From 2ce6dba98b1b7923ac29b5c60a0527555613fde4 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 20 Jun 2022 15:43:07 +0200 Subject: [PATCH] Remove `replaceInfix`; no longer used --- questionable/withoutresult.nim | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/questionable/withoutresult.nim b/questionable/withoutresult.nim index fca4dee..b0f1ffc 100644 --- a/questionable/withoutresult.nim +++ b/questionable/withoutresult.nim @@ -1,22 +1,5 @@ -import std/macros -import ./binding import ./without -macro replaceInfix(expression, operator, replacement): untyped = - ## Replaces an infix operator in an expression. The AST of the expression is - ## traversed to find and replace all instances of the operator. - - proc replace(expression, operator, replacement: NimNode): NimNode = - if expression.kind == nnkInfix and eqIdent(expression[0], operator): - expression[0] = replacement - expression[2] = replace(expression[2], operator, replacement) - else: - for i in 0..