aboutsummaryrefslogtreecommitdiff
path: root/lib/compat.ml4
diff options
context:
space:
mode:
authorletouzey2010-05-19 15:29:44 +0000
committerletouzey2010-05-19 15:29:44 +0000
commit259dde7928696593c2d3c6de474f5cf50fa4417d (patch)
tree7fe225a0731c13b30cb10ae7098e096f38903366 /lib/compat.ml4
parente1feff1215562d8f99fedf73c87011e6d7edca19 (diff)
Nicer representation of tokens, more independant of camlp*
Cf tok.ml, token isn't anymore string*string where first string encodes the kind of the token, but rather a nice sum type. Unfortunately, string*string (a.k.a Plexing.pattern) is still used in some places of Camlp5, so there's a few conversions back and forth. But the penalty should be quite low, and having nicer tokens helps in the forthcoming integration of support for camlp4 post 3.10 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13018 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/compat.ml4')
-rw-r--r--lib/compat.ml43
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compat.ml4 b/lib/compat.ml4
index 5ed8d7a546..c377581527 100644
--- a/lib/compat.ml4
+++ b/lib/compat.ml4
@@ -17,8 +17,7 @@ let unloc loc = Stdpp.first_pos loc, Stdpp.last_pos loc
let join_loc loc1 loc2 =
if loc1 = dummy_loc or loc2 = dummy_loc then dummy_loc
else Stdpp.encl_loc loc1 loc2
-type token = string*string
-type lexer = token Token.glexer
+type lexer = Tok.t Token.glexer
ELSE (* official camlp4 of ocaml >= 3.10 *)