Represent %raw, %ffi and %%raw with parsetree nodes
Pexp_raw (with a Raw_expression / Raw_function kind) and Pstr_raw hold the JavaScript source as written, so Pconst_raw_source is gone. PPXs still see the extensions, and v0 templates now keep their decoding.
- No Changelog trailer
- No Tests trailer
- Magic numbers bumped: cmi Caml1999I038, ast_impl ResImpl01317, ast_intf ResIntf01317, cmt Caml1999T045
- v0 PPX bridge changes; ast-mapping fixture or mapper unit test in the diff
36 files · +572 −187 · reanalyze 1 · analysis 4 · changelog 2 · codegen 1 · compiler 1 · frontend 3 · gentype 1 · typechecker 15 · syntax 5 · tests 3
| M | analysis/reanalyze/src/annotation.ml | +2 | −1 |
| M | analysis/src/completion_front_end.ml | +3 | −2 |
| M | analysis/src/document_symbol.ml | +1 | −2 |
| M | analysis/src/dump_ast.ml | +0 | −1 |
| M | analysis/src/utils.ml | +1 | −0 |
| A | changes/raw-extension-nodes.internal.md | +1 | −0 |
| A | changes/raw-template-ppx.fix.md | +1 | −0 |
| M | compiler/core/js_implementation.ml | +2 | −1 |
| M | compiler/ext/config.ml | +4 | −4 |
| M | compiler/frontend/ast_exp_handle_external.ml | +79 | −78 |
| M | compiler/frontend/ast_exp_handle_external.mli | +11 | −0 |
| M | compiler/frontend/bs_builtin_ppx.ml | +6 | −1 |
| M | compiler/gentype/annotation.ml | +2 | −1 |
| M | compiler/ml/ast_helper.ml | +4 | −0 |
| M | compiler/ml/ast_helper.mli | +9 | −0 |
| M | compiler/ml/ast_iterator.ml | +7 | −0 |
| M | compiler/ml/ast_mapper.ml | +14 | −0 |
| M | compiler/ml/ast_mapper_from0.ml | +45 | −3 |
| M | compiler/ml/ast_mapper_to0.ml | +28 | −1 |
| M | compiler/ml/ast_payload.ml | +13 | −4 |
| A | compiler/ml/ast_raw.ml | +74 | −0 |
| A | compiler/ml/ast_raw.mli | +30 | −0 |
| M | compiler/ml/depend.ml | +2 | −1 |
| M | compiler/ml/parsetree.ml | +19 | −6 |
| M | compiler/ml/pprintast.ml | +8 | −2 |
| M | compiler/ml/printast.ml | +16 | −1 |
| M | compiler/ml/typecore.ml | +8 | −3 |
| M | compiler/ml/typemod.ml | +3 | −0 |
| M | compiler/syntax/src/res_comments_table.ml | +10 | −0 |
| M | compiler/syntax/src/res_core.ml | +15 | −37 |
| M | compiler/syntax/src/res_parens.ml | +8 | −7 |
| M | compiler/syntax/src/res_parsetree_viewer.ml | +0 | −2 |
| M | compiler/syntax/src/res_printer.ml | +15 | −17 |
| M | tests/ounit_tests/ounit_ast_mapper0_tests.ml | +93 | −12 |
| A | tests/syntax_tests/data/ast-mapping/RawExtensions.res | +19 | −0 |
| A | tests/syntax_tests/data/ast-mapping/expected/RawExtensions.res.txt | +19 | −0 |