The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Text::MustacheTemplate::Parser - Simple mustache template parser

SYNOPSIS

    use Text::MustacheTemplate::Lexer;
    use Text::MustacheTemplate::Parser;

    # change delimiters
    # local $Text::MustacheTemplate::Lexer::OPEN_DELIMITER = '<%';
    # local $Text::MustacheTemplate::Lexer::CLOSE_DELIMITER = '%>';

    my $source = '* {{variable}}';
    my @tokens = Text::MustacheTemplate::Lexer->tokenize($source);
    local $Text::MustacheTemplate::Parser::SOURCE = $source; # optional for syntax error reporting
    my $ast = Text::MustacheTemplate::Parser->parse(@tokens);

DESCRIPTION

Text::MustacheTemplate::Parser is a simple parser for Mustache tempalte.

This is low-level interface for Text::MustacheTemplate. The APIs may be change without notice.

METHODS

parse

SYNTAXES

SYNTAX_RAW_TEXT
SYNTAX_VARIABLE
VARIABLE_HTML_ESCAPE
VARIABLE_RAW
SYNTAX_BOX
BOX_SECTION
BOX_INVERTED_SECTION
BOX_BLOCK
BOX_PARENT
REFERENCE_STATIC
REFERENCE_DYNAMIC
SYNTAX_COMMENT
SYNTAX_PARTIAL
REFERENCE_STATIC
REFERENCE_DYNAMIC
SYNTAX_DELIMITER

LICENSE

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

karupanerura <karupa@cpan.org>