progs/lexer/lexer.sc
changeset 935 3fb9b05465dd
parent 846 c24d16c89c48
child 942 7f52427568ff
--- a/progs/lexer/lexer.sc	Sun Oct 01 15:25:22 2023 +0100
+++ b/progs/lexer/lexer.sc	Mon Oct 02 23:10:56 2023 +0100
@@ -42,13 +42,13 @@
 implicit def string2rexp(s : String) : Rexp = 
   charlist2rexp(s.toList)
 
-implicit def RexpOps(r: Rexp) = new {
+extension (r: Rexp) {
   def | (s: Rexp) = ALT(r, s)
   def % = STAR(r)
   def ~ (s: Rexp) = SEQ(r, s)
 }
 
-implicit def stringOps(s: String) = new {
+extension (s: String) {
   def | (r: Rexp) = ALT(s, r)
   def | (r: String) = ALT(s, r)
   def % = STAR(s)