Location: PHPKode > projects > ThimbleDoc > thimble_doc/www/test.php
<prE>
<?php

  error_reporting(E_ALL);
  require_once('../parser/parser.php');
  require_once('../views/view_tt.php');
  require_once('../../thimble_text/editor/thimble_text.php');
 
  //$code = file_get_contents('../views/view_api.php');
  $code = file_get_contents('../translations/en.php');
  $parser = new ThimbleParser($code);
  $parser->parse();
  
function show_results($results) {
  foreach ($results as $result) {
  	echo get_class($result).' - ';
  	echo $result->name.' (';
  	echo $result->comment_text.")<br>";
  	print_r($result->info);
  	if (isset($result->includes)) print_r($result->includes);
  	echo '<blockquote>';
  	if (isset($result->arguments)) {
  	  echo 'Arguments:';
  	  print_r($result->arguments);
  	}
  	if (isset($result->variables)) {
  	  echo 'Variables:';
  	  print_r($result->variables);
  	}
  	if (isset($result->properties)) {
  	  echo 'Properties:';
  	  print_r($result->properties);
  	}
  	show_results($result->kids);
  	echo '</blockquote>';
  }
}
  
$start_time = microtime(true);

 /* $view = new ThimbleDocViewTT($parser->result);
 $result = $view->display('parser.php');
 echo  htmlspecialchars($result);

 echo '</pre>';
 echo '<pre>';
 
 $tt = new ThimbleText();
 echo htmlspecialchars($tt->parse_text($result));
 echo "\n\n";
 echo '</pre>';
 
 $tt = new ThimbleText();
 echo $tt->parse_text($result);
*/ 
echo '<pre>';
show_results($parser->result);
echo '</pre>';

echo microtime(true) - $start_time;

?>
</prE>
Return current item: ThimbleDoc