فهرست منبع

[parser] allow parsing `extern` as type path (closes #4535)

Simon Krajewski 9 سال پیش
والد
کامیت
1e43147f78
2فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 1 0
      parser.ml
  2. 6 0
      tests/unit/src/unit/issues/Issue4535.hx

+ 1 - 0
parser.ml

@@ -1308,6 +1308,7 @@ and expr_next e1 = parser
 		if is_resuming p then display (EDisplay (e1,false),p);
 		(match s with parser
 		| [< '(Kwd Macro,p2) when p.pmax = p2.pmin; s >] -> expr_next (EField (e1,"macro") , punion (pos e1) p2) s
+		| [< '(Kwd Extern,p2) when p.pmax = p2.pmin; s >] -> expr_next (EField (e1,"extern") , punion (pos e1) p2) s
 		| [< '(Kwd New,p2) when p.pmax = p2.pmin; s >] -> expr_next (EField (e1,"new") , punion (pos e1) p2) s
 		| [< '(Const (Ident f),p2) when p.pmax = p2.pmin; s >] -> expr_next (EField (e1,f) , punion (pos e1) p2) s
 		| [< '(Dollar v,p2); s >] -> expr_next (EField (e1,"$"^v) , punion (pos e1) p2) s

+ 6 - 0
tests/unit/src/unit/issues/Issue4535.hx

@@ -0,0 +1,6 @@
+package unit.issues;
+
+@:meta(haxe.extern.macro.Type)
+class Issue4535 extends Test {
+
+}