Skip to content

Instantly share code, notes, and snippets.

View yeahnoob's full-sized avatar
🏠
Working from home

Xanadu Zhang yeahnoob

🏠
Working from home
View GitHub Profile
grammar WordPairs {
rule word-pair { <key=word> <value=word> }
token word { \S+ }
rule TOP { <word-pair>* }
}
my %dict;
class WordPairsActions {
method word-pair($/) { %dict{~$<key>}.push(~$<value>) }