Closed ghost closed 1 year ago
Currently failing CI with
make: *** No rule to make target 'doc/manual/syntax/api2_d.rst_', needed by 'src/msg/help.cc'. Stop.
I will fix that next.
Thanks a lot for working on this, @abenedic ! Great work!
Can you split the work into smaller commits? This will make it easier for review and describe each change in commit message. E.g. one commit per each example, one (or a few) for source code, one (or a few) for documentation. Ideally each commit should build and pass the tests. You can either do this in the current PR (then I will wait until all commits in the PR look good, and then merge) or you can push into a separate branch that will be later merged into master, creating multiple PRs (not necessarily one for PR, but not all in one --- then I can merge commits as you make progress in that branch). Whatever is more convenient for you.
Can you split the work into smaller commits?
Absolutely! After I finish getting everything working properly I will go back and fix up things to look nicer.
Currently CI is failing with
/home/runner/work/re2c/re2c/build/split_man.py : unknown lang: b'd'
I should have some time later today to fix that and move over more examples.
Currently CI is failing with
/home/runner/work/re2c/re2c/.build/linux-gcc-ubsan-ootree-full/doc/manpage.rst.d:187: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: '../../examples/d/includes/definitions.d'.
I will look over the documentation generation more thoroughly later.
I noticed that one of the tests failed due to the extension being '??' which is set by run_tests.py.in if the first line of the file isn't one of the language dependent options, "// re2d" like for D. Still in the process of converting over the examples.
Still in the process of converting over the examples.
You don't need to convert them all in one go --- maybe it will be easier to split patches and start review process before converting all examples (if there's something that needs to be reworked, you'll have less work to do). Also, please note that C has more examples than Go and Rust, and you can convert only those present in Go and Rust (others are optional).
I am going to keep this branch open, and pull bits from this into other pull requests. I just updated it to use the new master.
Initial support for the D programming language. So far I have a few examples working and building and am working on fixing up the rest. I haven't done anything with the documentation yet, but can fix that up after all the examples are changed over. I am far from an expert in D, so the examples may not be very idiomatic.
So far I can build
re2d
with cmake and make and can run the examples like: