You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although using a single type for both (SyntaxKind) is easier, it doesn’t make illegal states unrepresentable. For example, if I’m matching on a SyntaxKind produced by my lexer, I know that the kind cannot be one of SyntaxKind’s node variants, e.g. BinaryExpr. Similarly, when I’m deciding what kind to give a node, I shouldn’t be able to create a node of kind LetKw.
The text was updated successfully, but these errors were encountered:
Although using a single type for both (
SyntaxKind
) is easier, it doesn’t make illegal states unrepresentable. For example, if I’mmatch
ing on aSyntaxKind
produced by my lexer, I know that the kind cannot be one ofSyntaxKind
’s node variants, e.g.BinaryExpr
. Similarly, when I’m deciding what kind to give a node, I shouldn’t be able to create a node of kindLetKw
.The text was updated successfully, but these errors were encountered: