From 239a0154cdab5fa0052f2ce98129e2c169dc1cc4 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Thu, 6 Jul 2017 12:23:56 +1200 Subject: Intelligently convert C/C++ comments to Rust With this change, we can correctly parse C++ block comments. ``` /** * Does a thing * * More documentation. This test does something * useful. */ ``` into ``` /// Does a thing /// /// More documentation. This test does something /// useful. ``` Fixes servo/rust-bindgen#426. --- tests/headers/convert-cpp-comment-to-rust.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/headers/convert-cpp-comment-to-rust.hpp (limited to 'tests/headers/convert-cpp-comment-to-rust.hpp') diff --git a/tests/headers/convert-cpp-comment-to-rust.hpp b/tests/headers/convert-cpp-comment-to-rust.hpp new file mode 100644 index 00000000..649c2365 --- /dev/null +++ b/tests/headers/convert-cpp-comment-to-rust.hpp @@ -0,0 +1,14 @@ + +typedef unsigned mbedtls_mpi_uint; + +/** + * \brief MPI structure + */ +typedef struct +{ + int s; /*!< integer sign */ + unsigned long n; /*!< total # of limbs */ + mbedtls_mpi_uint *p; /*!< pointer to limbs */ +} +mbedtls_mpi; + -- cgit v1.2.3