Add aditionnal information on a child-token and return an additionnal HInfoBox on it

Property definitions

nitc :: htmlight $ ANode :: decorate_tag
	# Add aditionnal information on a child-token and return an additionnal HInfoBox on it
	protected fun decorate_tag(v: HtmlightVisitor, res: HTMLTag, token: Token): nullable HInfoBox
	do
		#debug("no decoration for {token.inspect}")
		#res.add_class("nc_error")
		return null
	end
src/htmlight.nit:728,2--734,4

nitc :: htmlight $ AExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		var t = mtype
		if t == null then return null
		return t.infobox(v)
	end
src/htmlight.nit:1108,2--1113,4

nitc :: htmlight $ AFormaldef :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TClassid then return null
		res.add_class("nc_vt")
		var mtype = self.mtype
		if mtype == null then return null
		return mtype.infobox(v)
	end
src/htmlight.nit:1045,2--1052,4

nitc :: htmlight $ AQid :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if token != n_id then return null
		var parent = self.parent
		if parent == null then return null
		return parent.decorate_tag(v, res, token)
	end
src/htmlight.nit:751,2--757,4

nitc :: htmlight $ AQclassid :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if token != n_id then return null
		var parent = self.parent
		if parent == null then return null
		return parent.decorate_tag(v, res, token)
	end
src/htmlight.nit:741,2--747,4

nitc :: htmlight $ AParam :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if token != n_id then return null
		var mp = mparameter
		if mp == null then return null
		var variable = self.variable
		if variable == null then return null
		res.add_class("nc_v")
		return variable.infobox(v)
	end
src/htmlight.nit:871,2--880,4

nitc :: htmlight $ AType :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TClassid then return null
		var mt = mtype
		if mt == null then return null
		mt = mt.undecorate
		if mt isa MFormalType then
			res.add_class("nc_vt")
		end
		return mt.infobox(v)
	end
src/htmlight.nit:1032,2--1042,4

nitc :: htmlight $ ALabel :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		res.add_class("nc_la")
		return null
	end
src/htmlight.nit:893,2--898,4

nitc :: htmlight $ AForGroup :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		var vs = variables
		if vs == null then return null
		res.add_class("nc_v")
		var idx = n_ids.index_of(token)
		var variable = vs[idx]
		return variable.infobox(v)
	end
src/htmlight.nit:858,2--867,4

nitc :: htmlight $ AModuleName :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		var p = parent
		if p == null then return null
		return p.decorate_tag(v, res, token)
	end
src/htmlight.nit:932,2--937,4

nitc :: htmlight $ AMethid :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		return null
		# nothing to decorate
	end
src/htmlight.nit:992,2--996,4

nitc :: htmlight $ AAssignOp :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		var p = parent
		assert p isa AReassignFormExpr

		var callsite = p.reassign_callsite
		if callsite == null then return null
		return callsite.infobox(v)
	end
src/htmlight.nit:920,2--928,4

nitc :: htmlight $ AVardeclExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if token != n_id then return null
		var variable = self.variable
		if variable == null then return null
		res.add_class("nc_v")
		return variable.infobox(v)
	end
src/htmlight.nit:847,2--854,4

nitc :: htmlight $ AAssertExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		res.add_class("nc_ast")
		return null
	end
src/htmlight.nit:884,2--889,4

nitc :: htmlight $ ASendExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		var callsite = self.callsite
		if callsite == null then return null
		return callsite.infobox(v)
	end
src/htmlight.nit:902,2--907,4

nitc :: htmlight $ ANewExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		var callsite = self.callsite
		if callsite == null then return null
		return callsite.infobox(v)
	end
src/htmlight.nit:911,2--916,4

nitc :: htmlight $ AModuledecl :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		res.add_class("nc_def")
		res.add_class("nc_m")
		var p = parent
		assert p isa AModule
		var mm = p.mmodule
		if mm == null then return null
		return mm.infobox(v)
	end
src/htmlight.nit:941,2--951,4

nitc :: htmlight $ AStdImport :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		res.add_class("nc_m")
		var mm = mmodule
		if mm == null then return null
		return mm.infobox(v)
	end
src/htmlight.nit:955,2--962,4

nitc :: htmlight $ AAttrFormExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TAttrid then return null
		var p = mproperty
		if p == null then return null
		return p.intro.infobox(v)
	end
src/htmlight.nit:1015,2--1021,4

nitc :: htmlight $ AVarFormExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if token != n_id then return null
		var variable = self.variable
		if variable == null then return null
		res.add_class("nc_v")
		return variable.infobox(v)
	end
src/htmlight.nit:836,2--843,4

nitc :: htmlight $ AAttrPropdef :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TId then return null
		res.add_class("nc_def")
		var mpd: nullable MPropDef
		mpd = mreadpropdef
		if mpd == null then mpd = mpropdef
		if mpd == null then return null
		return mpd.infobox(v)
	end
src/htmlight.nit:965,2--974,4

nitc :: htmlight $ AStdClassdef :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TClassid then return null
		res.add_class("nc_def")

		var md = mclassdef
		if md == null then return null
		return md.infobox(v)
	end
src/htmlight.nit:769,2--777,4

nitc :: htmlight $ ATypePropdef :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TClassid then return null
		res.add_class("nc_def")
		var md = mpropdef
		if md == null then return null
		return md.infobox(v)
	end
src/htmlight.nit:1055,2--1062,4

nitc :: htmlight $ AStringFormExpr :: decorate_tag
	redef fun decorate_tag(v, res, token)
	do
		# Workaround to tag strings
		res.classes.remove("nc_l")
		res.add_class("nc_s")
		return super
	end
src/htmlight.nit:1099,2--1105,4