Skip to content
Snippets Groups Projects
Commit 66ef81ee authored by Alessandro Vullo's avatar Alessandro Vullo Committed by GitHub
Browse files

Merge pull request #13 from danstaines/master

added support for C-style multi-line comments
parents 0b051351 adb7fc07
No related branches found
No related tags found
No related merge requests found
......@@ -434,7 +434,23 @@ sub load_sql {
$self->note("Reading SQL from '$sql_file'");
work_with_file($sql_file, 'r', sub {
my ($fh) = @_;
my $is_comment = 0;
while(my $line = <$fh>) {
if($is_comment == 1) {
if($line =~ m/\*\//) {
$is_comment = 0;
}
next;
}
if($line =~ m/\/\*/) {
if($line !~ m/\*\//) {
$is_comment = 1;
}
next;
}
#ignore comments and white-space lines
if($line !~ /^#/ && $line =~ /\S/) {
$sql_com .= $line;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment