Skip to content

Commit

Permalink
Add haxe.EnumFlags<T> as EnumFlag hint alias
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Apr 5, 2024
1 parent f4921c5 commit 4760114
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hld/Value.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum Hint {
HNone;
HHex; // v:h
HBin; // v:b
HEnumFlags(t : String); // v:EnumFlags<T>
HEnumFlags(t : String); // v:EnumFlags<T>, v:haxe.EnumFlags<T>
HEnumIndex(t : String); // v:EnumIndex<T>
}

Expand All @@ -47,6 +47,8 @@ enum Hint {
return HBin;
if( StringTools.startsWith(s,"EnumFlags<") && StringTools.endsWith(s,">") )
return HEnumFlags(s.substr(10, s.length - 11));
if( StringTools.startsWith(s,"haxe.EnumFlags<") && StringTools.endsWith(s,">") )
return HEnumFlags(s.substr(15, s.length - 16));
if( StringTools.startsWith(s,"EnumIndex<") && StringTools.endsWith(s,">") )
return HEnumIndex(s.substr(10, s.length - 11));
return HNone;
Expand Down

0 comments on commit 4760114

Please sign in to comment.