Commit 745c3746 authored by Guido van Rossum's avatar Guido van Rossum

Move known attributes and exceptions here.

parent d4a15e46
......@@ -93,6 +93,28 @@ ZOPE_METAL_NS = "http://xml.zope.org/namespaces/metal"
NAME_RE = "[a-zA-Z_][a-zA-Z0-9_]*"
KNOWN_METAL_ATTRIBUTES = [
"define-macro",
"use-macro",
"define-slot",
"fill-slot",
]
KNOWN_TAL_ATTRIBUTES = [
"define",
"condition",
"insert",
"replace",
"repeat",
"attributes",
]
class TALError(Exception):
pass
class METALError(TALError):
pass
import re
_attr_re = re.compile(r"\s*([^\s]+)\s*(.*)")
_subst_re = re.compile(r"\s*(?:(text|structure)\s+)?(.*)")
......
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