Commit Graph

134 Commits (53d1c7c63d139f0b3ef288f72f8ae7ad105e53a9)

Author SHA1 Message Date
Alain Frisch a3dbe15046 Move some tools to a dedicated external project (https://github.com/alainfrisch/ppx_tools).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14082 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 16:59:23 +00:00
Alain Frisch 30d350779f Support for patterns in concrete syntax.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14080 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 13:04:09 +00:00
Alain Frisch 1c7e67c782 Use Ast_helper.default_loc instead of Location.none by default.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 12:23:32 +00:00
Alain Frisch 0a93a84a06 Doc, cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14078 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 12:12:33 +00:00
Xavier Clerc e82104a755 Remove labltk from the distribution (will be available as a third-party library).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 09:32:00 +00:00
Alain Frisch abdbda7e33 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14073 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-06 16:21:00 +00:00
Alain Frisch 462d83344f Porting pa_matches.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14050 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-30 14:55:37 +00:00
Alain Frisch 842f6794a9 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@14042 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-28 17:10:04 +00:00
Jacques Garrigue a18853fde9 Test not generalizing local lets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14038 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-28 09:59:11 +00:00
Jacques Garrigue 342282d225 make everything compile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13956 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-01 07:38:15 +00:00
Jacques Garrigue 8e14ca9ee6 put back trimming
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-31 07:35:02 +00:00
Jacques Garrigue 501789fd2b update #show patch to access environment in toplevel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13954 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-31 07:12:58 +00:00
Jacques Garrigue 4d68f643b6 update patch for 4.01
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13948 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-29 08:14:52 +00:00
Alain Frisch 411eb41b42 Allow an optional 'when' clause after a pattern payload.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13920 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-22 15:15:07 +00:00
Alain Frisch 87d9d6c877 More explicit internal representation of attribute payload. Now also support patterns as payload [%id ? pat].
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13919 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-22 14:58:15 +00:00
Alain Frisch 8df2057b46 Special syntax when the payload of attribute/extension is a single type expression: [@id : T], [%id : T]. Represented internally as (() : T).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13918 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-22 14:04:28 +00:00
Alain Frisch c928582092 A toy tool to produce an mli file from an annotated ml file.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 16:32:11 +00:00
Alain Frisch 2e199ef1f2 Item attributes on each let-binding.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 15:14:19 +00:00
Jérémie Dimino 8cee3aedf9 Revert addition of raw literals to the parsetree
It turns out it is not possible to have the exact raw representation
since a constant does not always correspond to exactly one token, so
there is no point in making the AST more complex.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-23 15:12:04 +00:00
Jérémie Dimino 4e7ae971a7 add the raw representation of constants to the parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-20 11:37:41 +00:00
Alain Frisch eb4130e47c The arument of attributes and extension nodes is now a structure, which is syntactically more general than an expression (through the embedding E -> [Pexp_eval E]).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13579 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-19 07:40:57 +00:00
Alain Frisch 4de999bd87 Doc.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13573 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:46:49 +00:00
Alain Frisch 958730ec78 Restore.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13572 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:46:00 +00:00
Alain Frisch 258bc8f02b Doc.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:45:31 +00:00
Alain Frisch 1eeace3bcf Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:28:49 +00:00
Alain Frisch 0ab42b2efa Enrich ifdef example.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13569 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:28:19 +00:00
Alain Frisch fc2ee380a1 Adapt ifdef example.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13567 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:06:33 +00:00
Alain Frisch 39ce6c23c3 Adapt js_of_ocaml ppx example.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13566 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 14:42:46 +00:00
Alain Frisch 5776fac7e8 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13564 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 14:07:18 +00:00
Alain Frisch 12ee47ee23 Another simple ppx extension which allows to include type/module type definitions from external .ml/mli files (by default, from the .mli file corresponding to the current .ml file).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13562 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 13:56:57 +00:00
Alain Frisch 67912da346 Allow abstract module declaration in structures to make the syntax and Parsetree more uniform.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 13:14:53 +00:00
Alain Frisch 84147074f9 Split Pexp_constraint into Pexp_coerce/Pexp_constraint.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13552 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 12:23:44 +00:00
Alain Frisch d2171a98d8 Split Pexp_function into Pexp_function/Pexp_fun.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13551 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 11:43:29 +00:00
Alain Frisch b36ec9f764 Get rid of the 'explicit arity' flag on Pexp_construct/Ppat_construct. If really requires (for camlp5?), the feature should be reimplemented with attributes.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13549 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:46:52 +00:00
Alain Frisch 501dfd2b5e Getting rid of Pexp_assertfalse/Texp_assertfalse.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13548 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:18:03 +00:00
Alain Frisch 088de517d8 Keep interval pattern sugar in the Parsetree (Camlp4 parsers still expand them).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13546 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-16 15:34:09 +00:00
Alain Frisch 158bc9c9e3 Get rid of the undocumented syntax #c[>`A] (#5936, #5983).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13542 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-16 12:17:17 +00:00
Alain Frisch 3fe10139ab Better representation of with-constraints.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-16 10:47:45 +00:00
Alain Frisch bfc9a8f9e1 Get rid of the location argument on pci_params, and improve location of error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-16 07:51:27 +00:00
Alain Frisch e7736899fb Explicit representation of guards, get rid of Pexp_when.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13528 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-15 16:23:22 +00:00
Alain Frisch b888068987 Avoid nested structures.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-12 12:01:40 +00:00
Alain Frisch 4e348f6d4c Better text.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13515 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-12 11:59:00 +00:00
Alain Frisch f7fee51ae3 Example of simple type-driven code generation.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13513 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 15:26:24 +00:00
Alain Frisch feb3e48ffe Continue convenience functions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13509 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 12:57:59 +00:00
Alain Frisch 3a5b7fe6b4 Convenience functions to build AST + implicit location.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13508 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 12:50:38 +00:00
Alain Frisch 42558e52f7 Comments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 12:24:36 +00:00
Alain Frisch d5682ed9cf A -ppx rewriter to evaluate expressions at compile time.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13506 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-11 12:21:02 +00:00
Alain Frisch aa4087c443 TODOs.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13504 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 18:06:40 +00:00
Alain Frisch 90bbd25948 Extension nodes as class field or class type field.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 17:54:54 +00:00
Alain Frisch 6e36fd566b Extension nodes and attributes for class types.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 17:44:15 +00:00