Created
December 10, 2016 00:37
-
-
Save anonymous/516419b49436856c2b11aec92ec5acae to your computer and use it in GitHub Desktop.
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 { | |
token TOP { \s* <InsertFunc> .+ } | |
token InsertFunc { 'insertNewLines' } | |
} | |
#my token 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