This module implements a subclass of
Template::TT3::Element::Whitespace
to
represent a token indicating the start of a template tag, e.g. [%
, %%
,
[?
, etc.
This module implements the following methods in addition to those inherited from the Template::TT3::Element::Whitespace , Template::TT3::Element , Template::TT3::Base and Badger::Base base classes.
This method implements some custom handling for skipping over whitespace when parsing tokens into an expression tree.
In the case of parse-time control directives (e.g. [? TAGS '(* *)' ?]
)
we want to hide the tokens inside the directive from the expression
parser because they have already been interpreted at tokenising time
and don't equate to runtime expressions that the parser understands.
So the tokeniser for these tags adds a BRANCH
entry in the start token for
the directive that points to the end token. When either of the
next_skip_ws()
or
skip_ws()
methods are called on one of these start
tokens (as we always do when a whitespace token
parse_expr()
method is
called) then we jump straight down to the end token and continue from there.
For all other tags, we advance to the next token as usual.
An alias to the next_skip_ws() method.
This method is called by a
Template::TT3::View
object as part of the double
dispatch process that is used to render views of template elements. It calls
the view_tag_start()
method against the view object passed as the only
argument, $view
. It passes itself as an argument to the
view_tag_start()
method.
Andy Wardley http://wardley.org
Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This module inherits methods from the Template::TT3::Element::Whitespace , Template::TT3::Element , Template::TT3::Base and Badger::Base base classes.
It is constructed using the Template::TT3::Class::Element class metaprogramming module.
The Template::TT3::Element::TagEnd module implements a related element used to represent the end of an embedded tag.