|
@@ 79-82 (lines=4) @@
|
| 76 |
|
|
| 77 |
|
$tokens = $this->benchmark($output, function() use($language, $source) { return $language->tokenize($source); }, $times['tokenization']); |
| 78 |
|
$counts['before'] = count($tokens); |
| 79 |
|
if(in_array('tree-before', $input->getOption('debug'))) { |
| 80 |
|
$output->writeln('<comment>Token tree before parsing: </comment>'); |
| 81 |
|
$output->writeln($debugFormatter->format(clone $tokens, false)); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
$tokens = $this->benchmark($output, function() use($language, $tokens) { return $language->parse($tokens); }, $times['parsing']); |
| 85 |
|
$counts['after'] = count($tokens); |
|
@@ 86-89 (lines=4) @@
|
| 83 |
|
|
| 84 |
|
$tokens = $this->benchmark($output, function() use($language, $tokens) { return $language->parse($tokens); }, $times['parsing']); |
| 85 |
|
$counts['after'] = count($tokens); |
| 86 |
|
if(in_array('tree-after', $input->getOption('debug'))) { |
| 87 |
|
$output->writeln('<comment>Token tree after parsing: </comment>'); |
| 88 |
|
$output->writeln($debugFormatter->format(clone $tokens)); |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
$formatted = $this->benchmark($output, function() use($formatter, $tokens) { return $formatter->format($tokens); }, $times['formatting']); |
| 92 |
|
|