<commit_before><?php
/**
 * File containing the ezcTemplateAstNodeGenerator class
 *
 * @package Template
 * @version //autogen//
 * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
 * @license http://ez.no/licenses/new_bsd New BSD License
 * @access private
 */
/**
 * Transforms the TST tree to an AST tree.
 *
 * Implements the ezcTemplateTstNodeVisitor interface for visiting the nodes
 * and generating the appropriate ast nodes for them.
 *
 * @package Template
 * @version //autogen//
 * @access private
 */
class ezcTemplateTstToAstTransformer implements ezcTemplateTstNodeVisitor
{
    /**
     * Prefix or all internal variables, e.g. counter and output.
     */
    const INTERNAL_PREFIX = "_ezcTemplate_";
    /**
     * Prefix or all external variables, ie. those coming from the template source.
     */
    const EXTERNAL_PREFIX = "_ezc_";

    public $programNode = null;

    public $functions; 

    public $type;

    public $parser;

    // Keeps track of current output and delimiter variable.
    protected $outputVariable;
    protected $delimOutputVar;
    protected $delimCounterVar;

    // Stuff used as parameters
    private $variableNames = array();

    private $noProperty = false;

    private $isFunctionFromObject = false;
    private $allowArrayAppend = false;

    protected $declaredVariables = array();

    public function __construct( $parser )
    {
        $this->functions = new ezcTemplateFunctions( $parser );
        $this->parser = $parser;<commit_msg>- Chose some shorter prefixes, _ for internal vars and t_ for external.<commit_after><?php
/**
 * File containing the ezcTemplateAstNodeGenerator class
 *
 * @package Template
 * @version //autogen//
 * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
 * @license http://ez.no/licenses/new_bsd New BSD License
 * @access private
 */
/**
 * Transforms the TST tree to an AST tree.
 *
 * Implements the ezcTemplateTstNodeVisitor interface for visiting the nodes
 * and generating the appropriate ast nodes for them.
 *
 * @package Template
 * @version //autogen//
 * @access private
 */
class ezcTemplateTstToAstTransformer implements ezcTemplateTstNodeVisitor
{
    /**
     * Prefix or all internal variables, e.g. counter and output.
     */
    const INTERNAL_PREFIX = "_";
    /**
     * Prefix or all external variables, ie. those coming from the template source.
     */
    const EXTERNAL_PREFIX = "t_";

    public $programNode = null;

    public $functions; 

    public $type;

    public $parser;

    // Keeps track of current output and delimiter variable.
    protected $outputVariable;
    protected $delimOutputVar;
    protected $delimCounterVar;

    // Stuff used as parameters
    private $variableNames = array();

    private $noProperty = false;

    private $isFunctionFromObject = false;
    private $allowArrayAppend = false;

    protected $declaredVariables = array();

    public function __construct( $parser )
    {
        $this->functions = new ezcTemplateFunctions( $parser );
        $this->parser = $parser;
{'fraction_non_alphanumeric': 0.09420524441566851, 'fraction_numerical': 0.005179669796050502, 'mean_word_length': 3.181326116373478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3019970', 'n_tokens_mistral': 890, 'n_tokens_neox': 827, 'n_words': 291}