Created
December 10, 2016 00:25
-
-
Save anonymous/60831794599431708de947de975139b8 to your computer and use it in GitHub Desktop.
Program
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
use v6; | |
grammar JavascriptFunc { | |
rule TOP { <InsertFunc> } | |
rule InsertFunc { \s* 'insertNewLines' } | |
} | |
#my rule InsFunc { \s* 'insertNewLines' } | |
for dir(test => 'inputgrid.html') -> $file { | |
if ($file.f) { | |
convert($file); | |
} | |
} | |
sub convert(IO::Path $f) { | |
for $f.lines -> $line { | |
my $m = JavascriptFunc.parse($line); | |
say $m if $m; | |
#my $s = $line ~~ /<InsFunc>/; | |
#say $s if $s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment