equal
deleted
inserted
replaced
21 def is_ok(str: String): Boolean = |
21 def is_ok(str: String): Boolean = |
22 try { thy_path(Path.explode(str)); true } |
22 try { thy_path(Path.explode(str)); true } |
23 catch { case ERROR(_) => false } |
23 catch { case ERROR(_) => false } |
24 |
24 |
25 |
25 |
26 /* node names */ |
26 /* document node names */ |
27 |
27 |
28 def external_node(raw_path: Path): Document.Node.Name = |
28 def path_node_name(raw_path: Path): Document.Node.Name = |
29 { |
29 { |
30 val path = raw_path.expand |
30 val path = raw_path.expand |
31 val node = path.implode |
31 val node = path.implode |
32 val dir = path.dir.implode |
32 val dir = path.dir.implode |
33 val theory = Thy_Header.thy_name(node) getOrElse error("Bad theory file name: " + path) |
33 val theory = Thy_Header.thy_name(node) getOrElse error("Bad theory file name: " + path) |
120 catch { case e: Throwable => Document.Node.bad_header(Exn.message(e)) } |
120 catch { case e: Throwable => Document.Node.bad_header(Exn.message(e)) } |
121 } |
121 } |
122 |
122 |
123 def check_thy(name: Document.Node.Name): Document.Node.Header = |
123 def check_thy(name: Document.Node.Name): Document.Node.Header = |
124 with_thy_text(name, check_thy_text(name, _)) |
124 with_thy_text(name, check_thy_text(name, _)) |
|
125 |
|
126 |
|
127 /* theory text edits */ |
|
128 |
|
129 def text_edits(reparse_limit: Int, previous: Document.Version, edits: List[Document.Edit_Text]) |
|
130 : (List[Document.Edit_Command], Document.Version) = |
|
131 Thy_Syntax.text_edits(base_syntax, reparse_limit, previous, edits) |
125 } |
132 } |
126 |
133 |