Skip to content

TokenComparison

An enum-like class that represents the result of comparing two Tokens.

The return type of Token.compareStrings.

Constants

Name Type Description
BothUnresolved TokenComparison This means both components are Tokens.
Different TokenComparison This means we're certain the two components are NOT Tokens, and different.
OneUnresolved TokenComparison This means exactly one of the components is a Token.
Same TokenComparison This means we're certain the two components are NOT Tokens, and identical.

BothUnresolvedRequired

func BothUnresolved() TokenComparison

This means both components are Tokens.


DifferentRequired

func Different() TokenComparison

This means we're certain the two components are NOT Tokens, and different.


OneUnresolvedRequired

func OneUnresolved() TokenComparison

This means exactly one of the components is a Token.


SameRequired

func Same() TokenComparison

This means we're certain the two components are NOT Tokens, and identical.