Created
November 18, 2016 00:09
-
-
Save anonymous/9c7bd705b83be9610b8660643da6ee01 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
my token text | |
{ | |
\N+ | |
# optional additional lines of offset text | |
[ | |
$$ | |
\n | |
^^ | |
$<leading-whitespace> = \h* {} | |
:my UInt:D $leading-whitespace = $/<leading-whitespace>.chars; | |
{ say '[DEBUG] $leading-whitespace: ', $leading-whitespace.perl } | |
\N+ | |
]* | |
} | |
my Str $text = q:to/EOF/.trim-trailing; | |
line 1 | |
line 2 | |
line 3 | |
line 4 | |
EOF | |
say so $text ~~ &text; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment