Skip to content

Instantly share code, notes, and snippets.

Created November 17, 2016 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/86f67673d67b03164956477ec6927efc to your computer and use it in GitHub Desktop.
Save anonymous/86f67673d67b03164956477ec6927efc to your computer and use it in GitHub Desktop.
my token abc
{
^^
$<leading-whitespace> = \h*
:my UInt:D $leading-whitespace = $/<leading-whitespace>.chars;
{ say '[DEBUG] $leading-whitespace: ', $leading-whitespace.perl }
{ say '[DEBUG] real $leading-whitespace: ', $/<leading-whitespace>.chars }
\w+
$$
}
my Str $text = q:to/EOF/.trim-trailing;
abc with two leading whitespaces
EOF
say so $text ~~ &abc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment