summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-19 15:59:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-19 15:59:02 +0000
commita41e59e351b87831971ce20731c9def439ae1615 (patch)
tree398196c0b3ee8686948cb2037f9f5bccb1e4147d /ext/B
parentd400eac8cf7f6208b5e548bc63ef450745fbe2d4 (diff)
downloadperl-a41e59e351b87831971ce20731c9def439ae1615.tar.gz
One more embedded (?sx) de-embedded, from Wolfgang Laun.
p4raw-id: //depot/perl@13807
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B/Assembler.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/B/B/Assembler.pm b/ext/B/B/Assembler.pm
index 10ae81bd0d..4db23f18bc 100644
--- a/ext/B/B/Assembler.pm
+++ b/ext/B/B/Assembler.pm
@@ -160,9 +160,8 @@ sub uncstring {
sub strip_comments {
my $stmt = shift;
# Comments only allowed in instructions which don't take string arguments
+ # Treat string as a single line so .* eats \n characters.
$stmt =~ s{
- (?sx) # Snazzy extended regexp coming up. Also, treat
- # string as a single line so .* eats \n characters.
^\s* # Ignore leading whitespace
(
[^"]* # A double quote '"' indicates a string argument. If we
@@ -170,7 +169,7 @@ sub strip_comments {
)
\s*\# # Any amount of whitespace plus the comment marker...
.*$ # ...which carries on to end-of-string.
- }{$1}; # Keep only the instruction and optional argument.
+ }{$1}sx; # Keep only the instruction and optional argument.
return $stmt;
}