PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/MC/Parser/Def/Empty.php

http://mc-goog-visualization.googlecode.com/
PHP | 32 lines | 11 code | 5 blank | 16 comment | 0 complexity | 950c7fe1a0cc4bbeeac1396165596afa MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /**
  3. * Parser Generator for PHP
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this package in the file LICENSE.
  9. *
  10. * @package MC_Parser
  11. * @author Chadwick Morris <chad@mailchimp.com>
  12. * @license http://www.opensource.org/licenses/mit-license.php
  13. * @version 0.1
  14. */
  15. /**
  16. * This match always succeeds with a zero-length suppressed token - useful for doing any kind of optional matching
  17. */
  18. class MC_Parser_Def_Empty extends MC_Parser_Def {
  19. public $suppress = true;
  20. public function _parse($str, $loc) {
  21. return array($loc, $this->token(null));
  22. }
  23. public function _name() {
  24. return 'empty string';
  25. }
  26. }
  27. ?>