# Path: statik/utils.py
# def add_url_path_component(path, component):
#     return '%s/%s' % (path.rstrip('/'), component.lstrip('/'))
# 
# Path: statik/templatetags.py
# class TemplateTagStore(object):
#     def __init__(self):
#     def invoke_tag(self, tag_name, context, *args, **kwargs):
#     def register_tag(self, name, fn):
#     def register_filter(self, name, fn):
#     def simple_tag(self, *args, **kwargs):
#             def decorator(fn):
#     def filter(self, *args, **kwargs):
#             def decorator(fn):


from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.exceptions import TemplateSyntaxError
from statik.utils import add_url_path_component
from statik import templatetags
import lipsum
import logging
        args = [parser.parse_expression()]

        return nodes.Output(
            [self.call_method('_asset', args)],
            lineno=lineno
        )


class StatikLoremIpsumExtension(Extension):
    """Allows users to generate "Lorem Ipsum" text/filler for their templates. This extension only supports
    generating words and sentences. It can generate a single paragraph of Lorem Ipsum text if no parameters
    are supplied."""

    tags = {"lipsum"}
    GENERATORS = {
        "words": lipsum.generate_words,
        "sentences": lipsum.generate_sentences,
        "paragraphs": lipsum.generate_paragraphs
    }

    def _lipsum(self, count, kind):
        return self.GENERATORS[kind](int(count))

    def parse(self, parser):
        lineno = next(parser.stream).lineno

        next_token = parser.stream.look()
        # if there are parameters
        if next_token.type == "comma":
            args = [parser.parse_expression()]

# Path: statik/utils.py
# def add_url_path_component(path, component):
#     return '%s/%s' % (path.rstrip('/'), component.lstrip('/'))
# 
# Path: statik/templatetags.py
# class TemplateTagStore(object):
#     def __init__(self):
#     def invoke_tag(self, tag_name, context, *args, **kwargs):
#     def register_tag(self, name, fn):
#     def register_filter(self, name, fn):
#     def simple_tag(self, *args, **kwargs):
#             def decorator(fn):
#     def filter(self, *args, **kwargs):
#             def decorator(fn):


# Path: statik/jinja2ext.py
from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.exceptions import TemplateSyntaxError
from statik.utils import add_url_path_component
from statik import templatetags
import lipsum
import logging

        args = [parser.parse_expression()]

        return nodes.Output(
            [self.call_method('_asset', args)],
            lineno=lineno
        )


class StatikLoremIpsumExtension(Extension):
    """Allows users to generate "Lorem Ipsum" text/filler for their templates. This extension only supports
    generating words and sentences. It can generate a single paragraph of Lorem Ipsum text if no parameters
    are supplied."""

    tags = {"lipsum"}
    GENERATORS = {
        "words": lipsum.generate_words,
        "sentences": lipsum.generate_sentences,
        "paragraphs": lipsum.generate_paragraphs
    }

    def _lipsum(self, count, kind):
        return self.GENERATORS[kind](int(count))

    def parse(self, parser):
        lineno = next(parser.stream).lineno

        next_token = parser.stream.look()
        # if there are parameters
        if next_token.type == "comma":
            args = [parser.parse_expression()]

            if parser.stream.skip_if('comma'):