public override void Call(ParseInfo parseInfo, DocRange callRange) { MarkupBuilder hoverContents = new MarkupBuilder() .StartCodeLine() .Add((_constant ? "constant " : "enum ") + Name) .EndCodeLine(); if (_constant) { hoverContents.NewSection().Add("Constant workshop types cannot be stored. Variables with this type cannot be changed from their initial value."); } parseInfo.Script.AddHover(callRange, hoverContents.ToString()); parseInfo.Script.AddToken(callRange, TokenType, TokenModifiers.ToArray()); }
public override void Call(ScriptFile script, DocRange callRange) { MarkupBuilder hoverContents = new MarkupBuilder(); if (Constant() == TypeSettable.Convertable) { hoverContents .StartCodeLine() .Add("enum " + Name) .EndCodeLine(); } else if (Constant() == TypeSettable.Constant) { hoverContents .StartCodeLine() .Add("constant " + Name) .EndCodeLine() .NewSection() .Add("Constant workshop types cannot be stored. Variables with this type cannot be changed from their initial value."); } script.AddHover(callRange, hoverContents.ToString()); }