-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ParseXS - handle #else and #endif without blank line prefixes
This patch makes it possible to omit some of the whitespace around preprocessor directives. It teaches fetch_para() to understand that a #else or #endif directive that does not end a #if that was seen in the current "paragraph" should not be parsed as part of that paragraph. This means that a conditional block that defines the same sub under different define conditions need not have extra whitespace after each sub definition.
- Loading branch information
Showing
4 changed files
with
78 additions
and
1 deletion.
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,21 @@ | ||
MODULE = My PACKAGE = My | ||
|
||
#ifdef MYDEF123 | ||
void | ||
do(dbh) | ||
SV *dbh | ||
CODE: | ||
{ | ||
int x; | ||
++x; | ||
} | ||
#else | ||
void | ||
do(dbh) | ||
SV *dbh | ||
CODE: | ||
{ | ||
int x; | ||
++x; | ||
} | ||
#endif |