|
@@ -84,6 +84,10 @@ class DisplayTestContext {
|
|
|
return haxe.Json.parse(callHaxe('$pos@signature'));
|
|
|
}
|
|
|
|
|
|
+ public function doc(pos:Position):String {
|
|
|
+ return extractDoc(callHaxe('$pos@type'));
|
|
|
+ }
|
|
|
+
|
|
|
public function metadataDoc(pos:Position):String {
|
|
|
return extractMetadata(callHaxe('$pos@type'));
|
|
|
}
|
|
@@ -173,6 +177,15 @@ class DisplayTestContext {
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+ static function extractDoc(result:String) {
|
|
|
+ var xml = Xml.parse(result);
|
|
|
+ xml = xml.firstElement();
|
|
|
+ if (xml.nodeName != "type") {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return StringTools.trim(xml.get('d'));
|
|
|
+ }
|
|
|
+
|
|
|
static function extractMetadata(result:String) {
|
|
|
var xml = Xml.parse(result);
|
|
|
xml = xml.firstElement();
|