nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/github: uses nitcorn to listen Github hook events.
[nit.git]
/
src
/
modelbuilder_base.nit
diff --git
a/src/modelbuilder_base.nit
b/src/modelbuilder_base.nit
index
18c8669
..
1f8c184
100644
(file)
--- a/
src/modelbuilder_base.nit
+++ b/
src/modelbuilder_base.nit
@@
-176,23
+176,29
@@
class ModelBuilder
# Helper function to display an error on a node.
# Alias for `self.toolcontext.error(n.hot_location, text)`
# Helper function to display an error on a node.
# Alias for `self.toolcontext.error(n.hot_location, text)`
- fun error(n: ANode, text: String)
+ fun error(n: nullable ANode, text: String)
do
do
- self.toolcontext.error(n.hot_location, text)
+ var l = null
+ if n != null then l = n.hot_location
+ self.toolcontext.error(l, text)
end
# Helper function to display a warning on a node.
# Alias for: `self.toolcontext.warning(n.hot_location, text)`
end
# Helper function to display a warning on a node.
# Alias for: `self.toolcontext.warning(n.hot_location, text)`
- fun warning(n: ANode, tag, text: String)
+ fun warning(n: nullable ANode, tag, text: String)
do
do
- self.toolcontext.warning(n.hot_location, tag, text)
+ var l = null
+ if n != null then l = n.hot_location
+ self.toolcontext.warning(l, tag, text)
end
# Helper function to display an advice on a node.
# Alias for: `self.toolcontext.advice(n.hot_location, text)`
end
# Helper function to display an advice on a node.
# Alias for: `self.toolcontext.advice(n.hot_location, text)`
- fun advice(n: ANode, tag, text: String)
+ fun advice(n: nullable ANode, tag, text: String)
do
do
- self.toolcontext.advice(n.hot_location, tag, text)
+ var l = null
+ if n != null then l = n.hot_location
+ self.toolcontext.advice(l, tag, text)
end
# Force to get the primitive method named `name` on the type `recv` or do a fatal error on `n`
end
# Force to get the primitive method named `name` on the type `recv` or do a fatal error on `n`
@@
-228,6
+234,8
@@
end
redef class ADoc
private var mdoc_cache: nullable MDoc
redef class ADoc
private var mdoc_cache: nullable MDoc
+
+ # Convert `self` to a `MDoc`
fun to_mdoc: MDoc
do
var res = mdoc_cache
fun to_mdoc: MDoc
do
var res = mdoc_cache