Alain Frisch
ec9dacb3f1
Support for attributes on class type fields.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-10 09:17:22 +00:00
Alain Frisch
d84ae41182
Item attributes on class fields.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13493 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-09 15:54:41 +00:00
Alain Frisch
d1751e4738
Allow to not have empty Ptyp_poly node in the Parsetree (the type-checker insert them automatically).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-09 14:10:54 +00:00
Alain Frisch
1eb1ec4c40
Get rid of core_field_type, more direct representation of object types.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13489 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-09 13:29:00 +00:00
Alain Frisch
47a3ee095e
Get rid of the Default case in Asttype.rec_flag.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-04 12:38:20 +00:00
Alain Frisch
27d523ea72
Better representation of variance in the Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-02 15:33:35 +00:00
Alain Frisch
1a63c4659c
Filtering of location and empty attribute fields.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13468 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-29 12:50:51 +00:00
Alain Frisch
7f973bc330
A tool to dump the Parsetree in OCaml syntax (relies on the toplevel pretty-printer).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13467 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-29 11:14:25 +00:00
Alain Frisch
6bfcb1da5b
Support for quoted strings.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 11:17:17 +00:00
Alain Frisch
c2c5b10685
Align module type binding with Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 08:21:29 +00:00
Alain Frisch
2ffa26af82
Align module binding with Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-26 08:09:26 +00:00
Alain Frisch
77d3fce857
Align exception_declaration with Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13446 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 18:42:45 +00:00
Alain Frisch
f4ca2da467
Align type_declaration with parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13445 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 18:20:11 +00:00
Alain Frisch
25815e6e77
Align typed value_declaration with parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 18:04:40 +00:00
Alain Frisch
fbde1f7e52
Align module and module type declarations between Parsetree and Typedtree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 17:47:28 +00:00
Alain Frisch
0b9347f482
Represent exception declarations as constructor declarations in the Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 15:49:10 +00:00
Alain Frisch
dd61fb5e55
Represent label and constructor declarations as records in the typedtree. Also keep return type for GADT constructors.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13441 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 14:56:56 +00:00
Alain Frisch
5c98dd91fe
Starting to keep attributes in the typedtree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13440 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-25 14:16:07 +00:00
Alain Frisch
b0987fd693
Attributes on expresions (etc) are now stored in the expression record, to facilitate pattern matching on structured fragments of AST while ignoring attributes. Introducing a new Ast_helper module to help creating AST fragments.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-08 14:59:45 +00:00
Alain Frisch
97c5f1a253
Attributes on label in record type declarations.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13361 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 13:51:18 +00:00
Alain Frisch
d50038cae7
Attribute has structure/signature item.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13359 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 12:27:32 +00:00
Alain Frisch
2cf65c8c85
Record for module type declarations.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 12:14:02 +00:00
Alain Frisch
24a0c6eb0e
Name is part of the value_description record.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 12:00:18 +00:00
Alain Frisch
241abe55e6
Type name is part of the type declaration record.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13356 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 11:47:59 +00:00
Alain Frisch
59bdf321d3
Switch Pstr_modtype argument to a record type.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13355 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 10:49:44 +00:00
Alain Frisch
a79811afe9
Finish attributes on module/recursive modules in structures.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13354 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-06 10:12:21 +00:00
Alain Frisch
cc70961d4f
Support item attributes on exn rebind.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13351 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-05 12:44:40 +00:00
Alain Frisch
b01b7305bd
Put name in the exception_declaration record.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13350 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-05 12:37:17 +00:00
Alain Frisch
42a33460ed
Item attributes on classes.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-05 12:06:38 +00:00
Alain Frisch
db579b0a1e
Extension as structure/signature items [%%lid expr].
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-05 11:46:25 +00:00
Alain Frisch
8461db39f1
Attributes on module/module type/recursive module declarations in interfaces.
...
Module:
[^^id expr] [^^id expr] ...
module X : S
[@@id expr] [@@id expr] ...
Module types:
[^^id expr] [^^id expr] ...
module type X = S
[@@id expr] [@@id expr] ...
Recursive modules:
module rec [^^id expr] [^^id expr] X1 : S1 [@@id expr] [@@id expr] ...
and [^^id expr] [^^id expr] X1 : S1 [@@id expr] [@@id expr] ...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13344 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 17:39:07 +00:00
Alain Frisch
a5059464fe
Attributes on open/include in signatures.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13343 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 16:36:32 +00:00
Alain Frisch
46c790a663
Attributes on exception declarations.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13342 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 16:20:49 +00:00
Alain Frisch
5f0aead005
Adding attributes on constructor declarations (type t = A [@id expr] | B [@id expr] of ...), and switch to a record type to represent those constructor declarations in the Parsetree.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13338 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 15:35:47 +00:00
Alain Frisch
be76a15a6b
Attributes/extensions as module types.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13336 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 14:11:15 +00:00
Alain Frisch
a2acbc8d3b
Adding extension/attribute on patterns.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 13:52:23 +00:00
Alain Frisch
e58b2cd036
Continue.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-04 12:54:57 +00:00
Alain Frisch
c8d3ff52a2
Cleanup + support attributes on type declarations (syntax: type t = ... with (:a1 expr1) (:a2 expr2) ... (:an exprn)).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-01 12:44:04 +00:00
Alain Frisch
152255e512
First version with attributes and extensions on expressions, type expressions and structure items.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-28 16:51:59 +00:00
Gabriel Scherer
bca20db060
fix PR#5930: ocamldep leaks temporary preprocessing files
...
Ah, if we had let-try...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-24 09:11:29 +00:00
Jacques Garrigue
26e1ff7138
Merge short-paths into a fresh branch of trunk.
...
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-29 14:21:12 +00:00
Alain Frisch
ef9fc7ab0f
#5904 : support for -ppx in the toplevel.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-25 09:12:31 +00:00
Alain Frisch
779580674f
Move ast_mapper to parsing/, make it part of compiler-libs, and add an interface. Plus minor code cleanup.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13249 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-16 16:10:29 +00:00
Alain Frisch
2a7b2fc5f1
Extend ast_mapper to allow mapping locations.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-07 14:13:01 +00:00
Alain Frisch
fbe6be791a
Mark explicitly unused bound variables (warning 27) in tast_iter.ml.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13209 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-07 12:31:58 +00:00
Wojciech Meyer
7efba284ce
Reverting "PR#5868: Bytecode dependencies should not appear in output of ocamldep"
...
-native flag semantics are currently different to that what the user
expects, and what was attempted to be fixed. The semantics of -native
are not to completely disable generation of dependencies for bytecode
instead make the compilation to native code more efficient.
Most of the project are expected to be buildable with both versions of
the compiler. So ocamldep is expected to always generate the
dependencies in both cases. When the .mli file is absent ocamldep
needs to still generate dependencies in bytecode to build the cmi only
and to build cmi and cmx for the dependent compilation unit . Because
of some make tool pecularities, handling of two different rules that
include the same depenency is problematic, so instead when the -native
flag is not used the cmo file is used as a proxy to build cmi, when
the -native enabled however, the cmx file is used as proxy to build
cmi file for the dependencies to avoid recompilation of the dependent
.cmo file just to get .cmi file.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-03 17:38:21 +00:00
Wojciech Meyer
f97f2f5bab
PR#5868: Somewhat a better fix for -native option.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 16:17:58 +00:00
Wojciech Meyer
04bca674d3
PR#5868: Bytecode dependencies should not appear in output of ocamldep when -native flag is used
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13194 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 15:09:08 +00:00
Alain Frisch
a19a4642e5
Enable 'unused stuff' warnings in tools/ and get rid of them.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13140 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-19 09:25:21 +00:00
Alain Frisch
f1d0e5afab
Add a -dtypedtree flag to all tools (using Printtyped). Also fix ocamlnat.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-18 17:19:53 +00:00