53 (if (files.isEmpty) "" else " (" + commas_quote(files) + ")") |
53 (if (files.isEmpty) "" else " (" + commas_quote(files) + ")") |
54 }).toList.sorted.mkString("keywords\n ", " and\n ", "") |
54 }).toList.sorted.mkString("keywords\n ", " and\n ", "") |
55 |
55 |
56 def keyword_kind_files(name: String): Option[(String, List[String])] = keywords.get(name) |
56 def keyword_kind_files(name: String): Option[(String, List[String])] = keywords.get(name) |
57 def keyword_kind(name: String): Option[String] = keyword_kind_files(name).map(_._1) |
57 def keyword_kind(name: String): Option[String] = keyword_kind_files(name).map(_._1) |
|
58 |
|
59 def thy_load(span: List[Token]): Option[List[String]] = |
|
60 keywords.get(Command.name(span)) match { |
|
61 case Some((Keyword.THY_LOAD, files)) => Some(files) |
|
62 case _ => None |
|
63 } |
58 |
64 |
59 def thy_load_commands: List[(String, List[String])] = |
65 def thy_load_commands: List[(String, List[String])] = |
60 (for ((name, (Keyword.THY_LOAD, files)) <- keywords.iterator) yield (name, files)).toList |
66 (for ((name, (Keyword.THY_LOAD, files)) <- keywords.iterator) yield (name, files)).toList |
61 |
67 |
62 def + (name: String, kind: (String, List[String]), replace: Option[String]): Outer_Syntax = |
68 def + (name: String, kind: (String, List[String]), replace: Option[String]): Outer_Syntax = |