The type of a token appearing in a Grammar. An autocomplete provider can use this information to provide a richer experience when editing text that is meant to be parsed by that grammar.
Grammar
Note: the String in Currency is an ISO 4217 currency code.
String
Currency
Decode a TokenType from JSON.
TokenType
import Json.Decode as Decode Decode.decodeString decoder "{\"tag\":\"nat\"}" --> Ok NatToken
Encode a TokenType to JSON.
import Json.Encode as Encode Encode.encode 0 (encode NatToken) --> "{\"tag\":\"nat\"}"
The type of a token appearing in a
Grammar. An autocomplete provider can use this information to provide a richer experience when editing text that is meant to be parsed by that grammar.Note: the
StringinCurrencyis an ISO 4217 currency code.