NASA-AMMOS / anms-camp

C code generator for AMP
https://anms-camp.readthedocs.io/en/latest/
Apache License 2.0
1 stars 2 forks source link

Warning from C generator #11

Open BrianSipos opened 2 months ago

BrianSipos commented 2 months ago

A warning is issued when the C generator is run, including by unit tests:

src/camp/generators/lib/campch_roundtrip.py:167
  /home/runner/work/anms-camp/anms-camp/src/camp/generators/lib/campch_roundtrip.py:167: DeprecationWarning: invalid escape sequence '\*'
    marker = '\* \\' + marker
BrianSipos commented 2 months ago

This can be fixed by a patch

--- a/src/camp/generators/lib/campch_roundtrip.py
+++ b/src/camp/generators/lib/campch_roundtrip.py
@@ -165,7 +165,7 @@ class C_Scraper(Scraper):
        def _get_custom_body_re_markers(self):
                indicator, marker = self._get_custom_body_pieces()

-               marker = '\* \\' + marker
+               marker = '\\* \\' + marker
                function_string_matcher = '(.+)'

                return indicator, marker.format('START', function_string_matcher), marker.format('STOP', function_string_matcher)