diff --git a/plugins/hearts2.py b/plugins/hearts2.py index 018b5b8..1e219d3 100755 --- a/plugins/hearts2.py +++ b/plugins/hearts2.py @@ -94,7 +94,7 @@ def leaders(n, top=True): # GRAMMAR # -tokens = ('POP', 'NOP', 'NAME', 'WORD', 'STR') +tokens = ('POP', 'DPOP', 'NOP', 'NAME', 'WORD', 'STR') def t_POP(t): r'\+\+|:((yellow|green|blue|purple)_)?heart:|<3|<3' @@ -102,6 +102,12 @@ def t_POP(t): t.value = 1 return t +def t_DPOP(t): + r':(two|revolving)_hearts:' + LOG.debug('t_DPOP {}'.format(t.value)) + t.value = 2 + return t + def t_NOP(t): r'--|