Skip to content

Commit

Permalink
fix semicolon handling after typedef
Browse files Browse the repository at this point in the history
see #10822
  • Loading branch information
Simn committed Nov 7, 2022
1 parent 3b0c0b3 commit 35f9684
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 194 deletions.
4 changes: 1 addition & 3 deletions src/syntax/grammar.mly
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,7 @@ and parse_type_decl mode s =
| [< n , p1 = parse_class_flags >] ->
parse_class_content doc meta c n p1 s
| [< '(Kwd Typedef,p1); name = type_name; tl = parse_constraint_params; '(Binop OpAssign,p2); t = parse_complex_type_at p2; s >] ->
(match s with parser
| [< '(Semicolon,_) >] -> ()
| [< >] -> ());
ignore(popt semicolon s);
(ETypedef {
d_name = name;
d_doc = doc_from_string_opt doc;
Expand Down
2 changes: 1 addition & 1 deletion std/flash/utils/Function.hx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package flash.utils;

typedef Function = Dynamic
typedef Function = Dynamic;
1 change: 1 addition & 0 deletions std/haxe/ds/Vector.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private typedef VectorData<T> =
#else
Array<T>
#end
;

/**
A Vector is a storage of fixed size. It can be faster than Array on some
Expand Down
4 changes: 2 additions & 2 deletions std/haxe/extern/Rest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ package haxe.extern;

/**
DEPRECATED: use haxe.Rest instead.
A special type that represents "rest" function argument.
Should be used as a type for the last argument of an extern method,
representing that arbitrary number of arguments of given type can be
passed to that method.
@see <https://haxe.org/manual/lf-externs.html>
**/
typedef Rest<T> = haxe.Rest<T>
typedef Rest<T> = haxe.Rest<T>;
Loading

0 comments on commit 35f9684

Please sign in to comment.