From b6469a4b5ec2fd20469d14c80cdc79b8a80fb60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pottier?= Date: Sat, 27 Dec 2014 15:46:42 +0100 Subject: [PATCH] Added [tokengadtdata]. --- src/tokenType.ml | 3 +++ src/tokenType.mli | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/tokenType.ml b/src/tokenType.ml index 4971ad39..6aac9dbb 100644 --- a/src/tokenType.ml +++ b/src/tokenType.ml @@ -189,3 +189,6 @@ let tctokengadt = let ttokengadt a = TypApp (tctokengadt, [ a ]) +let tokengadtdata token = + tokenprefix (ttokengadtdata token) + diff --git a/src/tokenType.mli b/src/tokenType.mli index ea1910de..95415df3 100644 --- a/src/tokenType.mli +++ b/src/tokenType.mli @@ -33,6 +33,11 @@ val tokendata: string -> string val ttokengadt: IL.typ -> IL.typ +(* [tokengadtdata] maps the name of a token to a data constructor of the token + GADT. *) + +val tokengadtdata: string -> string + (* These are the definitions of the types of tokens, for use by the code generators. This can be a list of zero, one, or two types. Indeed, this list is empty when [--external-tokens] is set. Otherwise, it contains just -- GitLab