cvs: pear /PHP_CodeSniffer/CodeSniffer/Tokenizers JS.php

From: Date: Mon, 31 Mar 2008 00:49:45 +0000
Subject: cvs: pear /PHP_CodeSniffer/CodeSniffer/Tokenizers JS.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-51753@lists.php.net to get a copy of this message
squiz Mon Mar 31 00:49:45 2008 UTC Modified files: /pear/PHP_CodeSniffer/CodeSniffer/Tokenizers JS.php Log: All JS files now get open and closing tag tokens so sniffs can check whole files at once http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php?r1=1.7&r2=1.8&diff_format=u Index: pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php diff -u pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php:1.7 pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php:1.8 --- pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php:1.7 Mon Mar 17 04:13:53 2008 +++ pear/PHP_CodeSniffer/CodeSniffer/Tokenizers/JS.php Mon Mar 31 00:49:45 2008 @@ -10,7 +10,7 @@ * @author Marc McIntyre <mmcintyre@squiz.net> * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600) * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence - * @version CVS: $Id: JS.php,v 1.7 2008/03/17 04:13:53 squiz Exp $ + * @version CVS: $Id: JS.php,v 1.8 2008/03/31 00:49:45 squiz Exp $ * @link http://pear.php.net/package/PHP_CodeSniffer */ @@ -242,6 +242,12 @@ $buffer = ''; $cleanBuffer = false; + $tokens[] = array( + 'code' => T_OPEN_TAG, + 'type' => 'T_OPEN_TAG', + 'content' => '', + ); + if (PHP_CODESNIFFER_VERBOSITY > 1) { echo "\t*** START TOKENIZING ***".PHP_EOL; } @@ -511,6 +517,12 @@ } }//end foreach + $tokens[] = array( + 'code' => T_CLOSE_TAG, + 'type' => 'T_CLOSE_TAG', + 'content' => '', + ); + /* Now that we have done some basic tokenizing, we need to modify the tokens to join some together and split some apart

« previous php.pear.cvs (#51753) next »