# Path: templar/exceptions.py
# class TemplarError(Exception):
#     """Top-level exception for Templar."""
#     pass


from templar.exceptions import TemplarError
import os
import re
            raise CyclicalIncludeError(self._stack, filename)
        self._stack.append(filename)

    def pop(self):
        self._stack.pop()


ALL_BLOCK_NAME = 'all'

BLOCK_OPEN_REGEX = re.compile("""
^.*?<\s*block\s+
([\w -]+)           # \1 is the block name
\s*>.*$
""", re.X)

BLOCK_CLOSE_REGEX = re.compile("""
^.*?<\s*/\s*block\s+
([\w -]+)           # \1 is the block name
\s*>.*$
""", re.X)

INCLUDE_REGEX = re.compile(r"""
^([ \t]*)       # \1 is leading whitespace
<\s*include\s+
    (.+?)       # \2 is filename
    (:.+?)?     # \3 is (optional) block name with leading colon
\s*>.*$
""", re.X)

VARIABLE_REGEX = re.compile(r"""

# Path: templar/exceptions.py
# class TemplarError(Exception):
#     """Top-level exception for Templar."""
#     pass


# Path: templar/linker.py
from templar.exceptions import TemplarError
import os
import re

            raise CyclicalIncludeError(self._stack, filename)
        self._stack.append(filename)

    def pop(self):
        self._stack.pop()


ALL_BLOCK_NAME = 'all'

BLOCK_OPEN_REGEX = re.compile("""
^.*?<\s*block\s+
([\w -]+)           # \1 is the block name
\s*>.*$
""", re.X)

BLOCK_CLOSE_REGEX = re.compile("""
^.*?<\s*/\s*block\s+
([\w -]+)           # \1 is the block name
\s*>.*$
""", re.X)

INCLUDE_REGEX = re.compile(r"""
^([ \t]*)       # \1 is leading whitespace
<\s*include\s+
    (.+?)       # \2 is filename
    (:.+?)?     # \3 is (optional) block name with leading colon
\s*>.*$
""", re.X)

VARIABLE_REGEX = re.compile(r"""

^~\s*        # Begins with ~