-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate each class generated with gen_bindings.py
- Loading branch information
Showing
10 changed files
with
460 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:dart_nvim_api/dart_nvim_api.dart'; | ||
|
||
{% for etype in exttypes %} | ||
{% if etype.name == "Buffer" %} | ||
class {{ etype.name }} { | ||
dynamic _codeData; | ||
/// Internal value that represents the type. | ||
get codeData => _codeData; | ||
{{ etype.name }}(this._codeData); | ||
|
||
{% for f in functions if f.ext and f.name.startswith(etype.prefix) %} | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
/// since: {{ f.since }} | ||
Future<{{ f.return_type.native_type_ret }}> {{ to_camel_case(trimmedFname) }}(Neovim neovim, {{ f.argstring }}) { | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
return neovim.session.call("{{f.name}}", | ||
args: [_codeData | ||
{% if f.parameters|count > 0 %} | ||
, {{ f.parameters|map(attribute = "name")|join(", ") }} | ||
{% endif %} | ||
]); | ||
} | ||
{% endfor %} | ||
} | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:dart_nvim_api/dart_nvim_api.dart'; | ||
|
||
{% for etype in exttypes %} | ||
{% if etype.name == "Tabpage" %} | ||
class {{ etype.name }} { | ||
dynamic _codeData; | ||
/// Internal value that represents the type. | ||
get codeData => _codeData; | ||
{{ etype.name }}(this._codeData); | ||
|
||
{% for f in functions if f.ext and f.name.startswith(etype.prefix) %} | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
/// since: {{ f.since }} | ||
Future<{{ f.return_type.native_type_ret }}> {{ to_camel_case(trimmedFname) }}(Neovim neovim, {{ f.argstring }}) { | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
return neovim.session.call("{{f.name}}", | ||
args: [_codeData | ||
{% if f.parameters|count > 0 %} | ||
, {{ f.parameters|map(attribute = "name")|join(", ") }} | ||
{% endif %} | ||
]); | ||
} | ||
{% endfor %} | ||
} | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:dart_nvim_api/dart_nvim_api.dart'; | ||
|
||
{% for etype in exttypes %} | ||
{% if etype.name == "Window" %} | ||
class {{ etype.name }} { | ||
dynamic _codeData; | ||
/// Internal value that represents the type. | ||
get codeData => _codeData; | ||
{{ etype.name }}(this._codeData); | ||
|
||
{% for f in functions if f.ext and f.name.startswith(etype.prefix) %} | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
/// since: {{ f.since }} | ||
Future<{{ f.return_type.native_type_ret }}> {{ to_camel_case(trimmedFname) }}(Neovim neovim, {{ f.argstring }}) { | ||
{% set trimmedFname = f.name | replace('nvim_', '') %} | ||
return neovim.session.call("{{f.name}}", | ||
args: [_codeData | ||
{% if f.parameters|count > 0 %} | ||
, {{ f.parameters|map(attribute = "name")|join(", ") }} | ||
{% endif %} | ||
]); | ||
} | ||
{% endfor %} | ||
} | ||
{% endif %} | ||
{% endfor %} |
Oops, something went wrong.