Token
type Token =
TokenNode<TokenType.AssignmentOperator> |
TokenNode<TokenType.VariableDeclaration> |
TokenNode<TokenType.LineBreak> |
TokenNode<TokenType.ConsoleLog> |
TokenValueNode<TokenType.Literal> |
TokenValueNode<TokenType.String>
Let's put all of these possible types together, and create one super type called Token
.
This is the type we'll be using whenever we reference a token, as as token can be any of these different values.