Commit 5a55b862 authored by Jim Fulton's avatar Jim Fulton

Changed to allow empty parts. This is needed so that people can use

extra semicolons at end, like Python allows extra commas.
parent 58893106
......@@ -88,6 +88,7 @@ Code generator for TALInterpreter intermediate code.
import re
import cgi
import string
from TALDefs import *
......@@ -150,6 +151,7 @@ class TALGenerator:
m = re.match(
r"\s*(?:(global|local)\s+)?(%s)\s+(.*)" % NAME_RE, part)
if not m:
if not string.strip(part): break # extra space after semi
raise TALError("invalid z:define syntax: " + `part`)
scope, name, expr = m.group(1, 2, 3)
scope = scope or "local"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment