src/Pure/General/position.scala
changeset 48992 0518bf89c777
parent 48920 9f84d872feba
child 49419 e2726211f834
equal deleted inserted replaced
48991:0350245dec1c 48992:0518bf89c777
    69   def purge(props: T): T =
    69   def purge(props: T): T =
    70     for ((x, y) <- props if !Isabelle_Markup.POSITION_PROPERTIES(x))
    70     for ((x, y) <- props if !Isabelle_Markup.POSITION_PROPERTIES(x))
    71       yield (if (purge_pos.isDefinedAt(x)) (purge_pos(x), y) else (x, y))
    71       yield (if (purge_pos.isDefinedAt(x)) (purge_pos(x), y) else (x, y))
    72 
    72 
    73 
    73 
    74   def str_of(pos: T): String =
    74   /* here: inlined formal markup */
       
    75 
       
    76   def here(pos: T): String =
    75     (Line.unapply(pos), File.unapply(pos)) match {
    77     (Line.unapply(pos), File.unapply(pos)) match {
    76       case (Some(i), None) => " (line " + i.toString + ")"
    78       case (Some(i), None) => " (line " + i.toString + ")"
    77       case (Some(i), Some(name)) => " (line " + i.toString + " of " + quote(name) + ")"
    79       case (Some(i), Some(name)) => " (line " + i.toString + " of " + quote(name) + ")"
    78       case (None, Some(name)) => " (file " + quote(name) + ")"
    80       case (None, Some(name)) => " (file " + quote(name) + ")"
    79       case _ => ""
    81       case _ => ""