Dan Korostelev 5 years ago
parent
commit
beca35ce22
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/syntax/grammar.mly

+ 2 - 2
src/syntax/grammar.mly

@@ -511,8 +511,8 @@ and parse_common_flags = parser
 	| [< '(Kwd Macro,p); l = parse_common_flags >] -> (DMacro,p) :: l
 	| [< '(Kwd Macro,p); l = parse_common_flags >] -> (DMacro,p) :: l
 	| [< '(Kwd Dynamic,p); l = parse_common_flags >] -> (DDynamic,p) :: l
 	| [< '(Kwd Dynamic,p); l = parse_common_flags >] -> (DDynamic,p) :: l
 	| [< '(Kwd Inline,p); l = parse_common_flags >] -> (DInline,p) :: l
 	| [< '(Kwd Inline,p); l = parse_common_flags >] -> (DInline,p) :: l
-	| [< '(Kwd Public,p); l = parse_common_flags; s >] -> syntax_error (Custom "public modifier is not supported for module-level declarations") ~pos:(Some p) s l
-	| [< '(Kwd Static,p); l = parse_common_flags; s >] -> syntax_error (Custom "static modifier is not supported for module-level declarations") ~pos:(Some p) s l
+	| [< '(Kwd Public,p); l = parse_common_flags >] -> syntax_error_with_pos (Custom "public modifier is not supported for module-level declarations") p l
+	| [< '(Kwd Static,p); l = parse_common_flags >] -> syntax_error_with_pos (Custom "static modifier is not supported for module-level declarations") p l
 	| [< >] -> []
 	| [< >] -> []
 
 
 and parse_meta_argument_expr s =
 and parse_meta_argument_expr s =