nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/doc: rename `tpl_link` into `html_link` and use bootstrap template
[nit.git]
/
src
/
doc
/
doc_base.nit
diff --git
a/src/doc/doc_base.nit
b/src/doc/doc_base.nit
index
e947ee2
..
64b2022
100644
(file)
--- a/
src/doc/doc_base.nit
+++ b/
src/doc/doc_base.nit
@@
-68,7
+68,7
@@
end
abstract class DocComposite
# Parent element.
abstract class DocComposite
# Parent element.
- var parent: nullable DocComposite = null
+ var parent: nullable DocComposite = null is writable
# Does `self` have a `parent`?
fun is_root: Bool do return parent == null
# Does `self` have a `parent`?
fun is_root: Bool do return parent == null
@@
-85,6
+85,7
@@
abstract class DocComposite
#
# Shortcut for `children.add`.
fun add_child(child: DocComposite) do
#
# Shortcut for `children.add`.
fun add_child(child: DocComposite) do
+ child.parent = self
children.add child
end
end
children.add child
end
end