Skip to content
Open
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
6 changes: 3 additions & 3 deletions generate_imgui_bindings.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
sub generateNamespaceImgui {
my ($imguiCodeBlock) = @_;

my $lineCaptureRegex = qr" *(IMGUI_API) *((const char\*)|([^ ]+)) *([^\(]+)\(([^\;]*)\);";
my $lineCaptureRegex = qr" *(IMGUI_API)\s*((const char\*)|([^\s]+))\s*([^\(]+)\(([^\;]*)\);";
my $doEndStackOptions = 1;
my $terminator = "} \/\/ namespace ImGui";
my $callPrefix = "";
Expand Down Expand Up @@ -70,7 +70,7 @@ sub generateNamespaceImgui {
sub generateDrawListFunctions {
my ($imguiCodeBlock) = @_;

my $lineCaptureRegex = qr" *(IMGUI_API|inline) *((const char\*)|([^ ]+)) *([^\(]+)\(([^\;]*)\);";
my $lineCaptureRegex = qr" *(IMGUI_API|inline)\s*((const char\*)|([^\s]+))\s*([^\(]+)\(([^\;]*)\);";
my $doEndStackOptions = 0;
my $terminator = 0;
my $callPrefix = "DRAW_LIST_";
Expand Down Expand Up @@ -464,7 +464,7 @@ sub generateEnums {

for (my $i=0; $i < scalar @blocks; $i++) {
print "//" . $blocknames[$i] . "\n";
if (($blocknames[$i] eq "namespace ImGui\n") and not $alreadyParsedMainImguiNamespace) {
if (($blocknames[$i] =~ /^namespace ImGui\s*$/) and not $alreadyParsedMainImguiNamespace) {
$alreadyParsedMainImguiNamespace = 1;
generateNamespaceImgui($blocks[$i]);
}
Expand Down
Loading