Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dart doc #398

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example/dart/lib/src/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion feature_tests/dart/lib/src/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions tool/templates/dart/base.dart.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@

{% for directive in directives -%}
{{directive}}
{% endfor -%}

{% endfor %}
{{ body }}

{%- for helper_class in helper_classes.values() %}

{% for helper_class in helper_classes.values() -%}
{%- if !loop.first %}
{% endif -%}
{{helper_class}}

{%- endfor %}

{% endfor -%}
4 changes: 2 additions & 2 deletions tool/templates/dart/enum.dart.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- if !docs.is_empty() %}
{% if !docs.is_empty() -%}
/// {{docs}}
{%- endif %}
{% endif -%}
enum {{type_name}} {
{%- for enum_variant in ty.variants %}
{% if !enum_variant.docs.is_empty() -%}
Expand Down
1 change: 0 additions & 1 deletion tool/templates/dart/init.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/// A [Rune] is a Unicode code point, such as `a`, or `💡`.
///
/// The recommended way to obtain a [Rune] is to create it from a
Expand Down
4 changes: 2 additions & 2 deletions tool/templates/dart/opaque.dart.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- if !docs.is_empty() %}
{% if !docs.is_empty() -%}
/// {{docs}}
{%- endif %}
{% endif -%}
final class {{type_name}} implements ffi.Finalizable {
final ffi.Pointer<ffi.Opaque> _underlying;

Expand Down
6 changes: 3 additions & 3 deletions tool/templates/dart/struct.dart.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{%- if !docs.is_empty() %}
/// {{docs}}
{%- endif %}
final class _{{type_name}}Ffi extends ffi.Struct {
{%- for field in fields %}
{%- match field.annotation %}
Expand All @@ -12,6 +9,9 @@ final class _{{type_name}}Ffi extends ffi.Struct {
{%- endfor %}
}

{% if !docs.is_empty() -%}
/// {{docs}}
{% endif -%}
final class {{type_name}} {
final _{{type_name}}Ffi _underlying;

Expand Down
Loading