Open utterances-bot opened 1 year ago
In the first example of Enum matching, I am getting error message "Expected }" in the line "enum GameEvent {". What could be problem?
@ccpplinux Sounds like you accidentally have put the enum declaration inside the class.
Pattern matching - Beginner - Haxe programming language cookbook
This article helps to learn pattern matching and all of its type of matching in practice. The article covers basic matching, variable capture, guards, extractors and enum/structure matching.
https://code.haxe.org/category/beginner/pattern-matching.html