src/Pure/System/options.scala
changeset 73712 3eba8d4b624b
parent 73359 d8a0e996614b
child 73715 bf51c23f3f99
equal deleted inserted replaced
73711:5833b556b3b5 73712:3eba8d4b624b
   353       case None => error("Missing value for option " + quote(name) + " : " + opt.typ.print)
   353       case None => error("Missing value for option " + quote(name) + " : " + opt.typ.print)
   354     }
   354     }
   355   }
   355   }
   356 
   356 
   357   def + (str: String): Options =
   357   def + (str: String): Options =
   358   {
   358     str match {
   359     str.indexOf('=') match {
   359       case Properties.Eq((a, b)) => this + (a, b)
   360       case -1 => this + (str, None)
   360       case _ => this + (str, None)
   361       case i => this + (str.substring(0, i), str.substring(i + 1))
   361     }
   362     }
       
   363   }
       
   364 
   362 
   365   def ++ (specs: List[Options.Spec]): Options =
   363   def ++ (specs: List[Options.Spec]): Options =
   366     specs.foldLeft(this) { case (x, (y, z)) => x + (y, z) }
   364     specs.foldLeft(this) { case (x, (y, z)) => x + (y, z) }
   367 
   365 
   368 
   366