Skip to content

Operators comprised more than one symbols #1241

Answered by Guldoman
nsgnkhibdk2cls0f asked this question in Q&A
Discussion options

You must be logged in to vote

You can add other patterns that have type operator.

That pattern will still apply to >>, <<, >>>, <<<, -> and <>, as the tokenizer will apply the operator token type to each character.
:= might instead result in : matching with some other rule and = matching as operator.
So to make it match the entire := you can add a rule like:

{ pattern = ":=",     type = "operator" },

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nsgnkhibdk2cls0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants