Browse Source

fix completion with @:enum (and other keywords in metadata) (close #2373)

Nicolas Cannasse 11 years ago
parent
commit
2935981e24
1 changed files with 3 additions and 0 deletions
  1. 3 0
      parser.ml

+ 3 - 0
parser.ml

@@ -714,6 +714,9 @@ and parse_class_field_resume tdecl s =
 		in
 		in
 		let rec loop k =
 		let rec loop k =
 			match List.rev_map fst (Stream.npeek k s) with
 			match List.rev_map fst (Stream.npeek k s) with
+			(* metadata *)
+			| Kwd _ :: At :: _ | Kwd _ :: DblDot :: At :: _ ->
+				loop (k + 1)
 			(* field declaration *)
 			(* field declaration *)
 			| Const _ :: Kwd Function :: _
 			| Const _ :: Kwd Function :: _
 			| Kwd New :: Kwd Function :: _ ->
 			| Kwd New :: Kwd Function :: _ ->