mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
dsdlc: Fixed comment generation
This commit is contained in:
parent
1c52527f97
commit
12b35d0da9
@ -260,7 +260,7 @@ def make_template_expander(filename):
|
||||
template_text = re.sub(r'([^\$]{0,1})\$\{([^\}]+)\}', r'\1$!\2!$', template_text)
|
||||
|
||||
# Flow control expression transformation: % foo: ==> <!--(foo)-->
|
||||
template_text = re.sub(r'(?m)^(\ *)\%\ *([^\:]+?):{0,1}$', r'\1<!--(\2)-->', template_text)
|
||||
template_text = re.sub(r'(?m)^(\ *)\%\ *(.+?):{0,1}$', r'\1<!--(\2)-->', template_text)
|
||||
|
||||
# Block termination transformation: <!--(endfoo)--> ==> <!--(end)-->
|
||||
template_text = re.sub(r'\<\!--\(end[a-z]+\)--\>', r'<!--(end)-->', template_text)
|
||||
|
||||
@ -311,7 +311,7 @@ const ::uavcan::DefaultDataTypeRegistrator< ${t.cpp_full_type_name} > _uavcan_gd
|
||||
// No default registration
|
||||
% endif
|
||||
|
||||
% for nsc in t.cpp_namespace_components:
|
||||
% for nsc in t.cpp_namespace_components[::-1]:
|
||||
} // Namespace ${nsc}
|
||||
% endfor
|
||||
|
||||
@ -387,8 +387,8 @@ ${define_streaming_operator(type_name=t.cpp_full_type_name + '::Response')}
|
||||
${define_streaming_operator(type_name=t.cpp_full_type_name)}
|
||||
% endif
|
||||
|
||||
% for nsc in t.cpp_namespace_components:
|
||||
}
|
||||
% for nsc in t.cpp_namespace_components[::-1]:
|
||||
} // Namespace ${nsc}
|
||||
% endfor
|
||||
|
||||
#endif // ${t.include_guard}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user