A code block can be empty.

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

@ -118,16 +118,14 @@ def p_codeblock(t):
cb = t[3]
cb.prepend(t[1])
t[0] = cb
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