A code block can be empty.

pull/15/head
Jussi Pakkanen 11 years ago
parent d1dfb5f512
commit 325181cc7b
  1. 8
      mparser.py

@ -123,11 +123,9 @@ def p_codeblock_emptyline(t):
'codeblock : EOL codeblock'
t[0] = t[2]
def p_codeblock_last(t):
'codeblock : statement EOL'
cb = nodes.CodeBlock(t[1].lineno())
cb.prepend(t[1])
t[0] = cb
def p_codeblock_empty(t):
'codeblock : '
t[0] = nodes.CodeBlock(-1)
def p_expression_atom(t):
'expression : ATOM'

Loading…
Cancel
Save