NAME

Top Close Open

Template::TT3::Developer::Elements - compiled template elements

INTRODUCTION

Top Close Open

This is a rough draft of the developer documentation that will describe how compiled templates are represented using an element tree.

ELEMENT MODULES

Top Close Open

The hierarchy of elements is as follows:

Element
    Literal
        Text
        Padding
        String
            Squote
            Dquote
    Whitespace
        Comment
    Delimiter
        TagEnd
    Terminator
        End

There are more... but I haven't cleaned those up yet

Literal Elements

Top Close Open

Template::TT3::Element::Literal

Top Close Open

Base class for all elements that represent a chunk of literal text.

Template::TT3::Element::Text

Top Close Open

An element representing a plain text token.

Template::TT3::Element::Padding

Top Close Open

An element representing a synthesised padding token. e.g. the single space added around a tag by the = pre/post chomp flags.

Template::TT3::Element::String

Top Close Open

A base class element for quoted strings.

Template::TT3::Element::Squote

Top Close Open

A subclass of Template::TT3::Element::String for 'single quoted' strings.

Template::TT3::Element::Dquote

Top Close Open

A subclass of Template::TT3::Element::String for "double quoted" strings.

Whitespace and Other Ignorable Elements

Top Close Open

Template::TT3::Element::Whitespace

Top Close Open

An element representing an ignorable whitespace token.

Template::TT3::Element::Comment

Top Close Open

A subclass of Template::TT3::Element::Whitespace for ignorable comments.

Separator, Delimiter and Terminator Tokens

Top Close Open

Template::TT3::Element::Delimiter

Top Close Open

An element representing am expression delimiter. This includes the semi-colon, ;, and the end of tag tokens (e.g. %], ?], etc) represented by the Template::TT3::Element::TagEnd subclass.

Template::TT3::Element::TagEnd

Top Close Open

A thin subclass of Template::TT3::Element::Delimiter for representing end of tag tokens (e.g. %], ?], etc)

Template::TT3::Element::Terminator

Top Close Open

An element representing a terminator token. e.g. the end keyword and the ], } and ) tokens used to terminate lists, hash arrays and parameter lists.

Template::TT3::Element::End

Top Close Open

A thin subclass of Template::TT3::Element::Terminator which acts like a keyword when presented via a view (e.g. for the purpose of syntax highlighting).

Template::TT3::Element::Eof

Top Close Open

A synthesised element used to represent the end of file.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org/

COPYRIGHT

Top Close Open

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.


http://tt3.template-toolkit.org/docs/Template/TT3/Developer/Elements.pod last modified 2009-12-20 14:34:42