equal
deleted
inserted
replaced
581 /* control symbols */ |
581 /* control symbols */ |
582 |
582 |
583 val control_prefix = "\\<^" |
583 val control_prefix = "\\<^" |
584 val control_suffix = ">" |
584 val control_suffix = ">" |
585 |
585 |
|
586 def control_name(sym: Symbol): Option[String] = |
|
587 if (is_control_encoded(sym)) |
|
588 Some(sym.substring(control_prefix.length, sym.length - control_suffix.length)) |
|
589 else None |
|
590 |
586 def is_control_encoded(sym: Symbol): Boolean = |
591 def is_control_encoded(sym: Symbol): Boolean = |
587 sym.startsWith(control_prefix) && sym.endsWith(control_suffix) |
592 sym.startsWith(control_prefix) && sym.endsWith(control_suffix) |
588 |
593 |
589 def is_control(sym: Symbol): Boolean = |
594 def is_control(sym: Symbol): Boolean = |
590 is_control_encoded(sym) || symbols.control_decoded.contains(sym) |
595 is_control_encoded(sym) || symbols.control_decoded.contains(sym) |