Skip to content

Commit f3a59a8

Browse files
committed
less wip
1 parent b2581d4 commit f3a59a8

File tree

2 files changed

+18
-579
lines changed

2 files changed

+18
-579
lines changed

app/Parser/Parse.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Parse
1010
{
11-
public static $lastNode = null;
11+
public static $debug = false;
1212

1313
public static function parse(Node $node, $depth = 0, ?AbstractContext $currentContext = null)
1414
{
@@ -75,11 +75,15 @@ protected static function getCodeSnippet(Node $node)
7575

7676
protected static function debug($depth, ...$messages)
7777
{
78-
echo str_repeat(' ', $depth) . implode(' ', $messages) . PHP_EOL;
78+
if (self::$debug) {
79+
echo str_repeat(' ', $depth) . implode(' ', $messages) . PHP_EOL;
80+
}
7981
}
8082

8183
protected static function debugBreak()
8284
{
83-
echo PHP_EOL;
85+
if (self::$debug) {
86+
echo PHP_EOL;
87+
}
8488
}
8589
}

0 commit comments

Comments
 (0)