closes #10171
@@ -192,7 +192,7 @@ let get_doc s =
| None -> None
| Some (d,pos) ->
last_doc := None;
- if pos = p.pmin then Some d else None
+ Some d
let unsupported_decl_flag decl flag pos =
let msg = (s_decl_flag flag) ^ " modifier is not supported for " ^ decl in
@@ -243,9 +243,9 @@ let parse entry ctx code file =
match fst tk with
| Comment s ->
(* if encloses_resume (pos tk) then syntax_completion SCComment (pos tk); *)
- let tk = next_token() in
let l = String.length s in
if l > 0 && s.[0] = '*' then last_doc := Some (String.sub s 1 (l - (if l > 1 && s.[l-1] = '*' then 2 else 1)), (snd tk).pmin);
+ let tk = next_token() in
tk
| CommentLine s ->
if !in_display_file then begin
@@ -0,0 +1,14 @@
+/**
+ I'm a library!
+**/
+
+ a random number generator (only works once)
+function randomNumber() {
+ return 7;
+}
+function main() {
+ randomNumber();
@@ -0,0 +1,4 @@
+-cp src
+-main Main
+--interp
+--display "Main.hx@150@signature"
@@ -0,0 +1 @@
+{"signatures":[{"documentation":"\n\ta random number generator (only works once)\n","label":"():Int","parameters":[]}],"activeParameter":0,"activeSignature":0}