Liquid = require "../../liquid"

module.exports = class Layout extends Liquid.Tag
  Syntax = /([a-z0-9\/\\_-]+)/i
  SyntaxHelp = "Syntax Error in 'extends' - Valid syntax: extends [templateName]"

  constructor: (tagName, markup, tokens, template) ->
    match = Syntax.exec(markup)
    throw new Liquid.SyntaxError(SyntaxHelp) unless match

    template.extends = 'src/Common/layouts/' + match[1]
    super

  render: (context) ->
    ""