From c3339b626209ac15790791afc023d0c33b57016e Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 7 Apr 2015 17:37:36 +0700 Subject: [PATCH] src/hightlight: hightlight and do not crash on MNotNullType Also add MNullType that where missing. Signed-off-by: Jean Privat --- src/highlight.nit | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/highlight.nit b/src/highlight.nit index e6ca8ea..39a042a 100644 --- a/src/highlight.nit +++ b/src/highlight.nit @@ -510,6 +510,33 @@ redef class MNullableType end end +redef class MNotNullType + redef fun infobox(v) + do + return mtype.infobox(v) + end + redef fun linkto + do + var res = new HTMLTag("span") + res.append("not null ").add(mtype.linkto) + return res + end +end + +redef class MNullType + redef fun infobox(v) + do + var res = new HInfoBox(v, to_s) + return res + end + redef fun linkto + do + var res = new HTMLTag("span") + res.append("null") + return res + end +end + redef class MSignature redef fun linkto do -- 1.7.9.5