Commit feee525d authored by Pietro Saccardi's avatar Pietro Saccardi

__toString does not print a newline anymore.

parent b7bb19cb
......@@ -148,7 +148,7 @@ class ElementInstance {
foreach ($this->args() as $arg) {
++$argIdx;
if ($arg instanceof TokenInstance) {
echo $indentStr . $extraIndentStr . '+-' . $arg;
echo $indentStr . $extraIndentStr . '+-' . $arg . "\n";
} else {
$arg->printTree($indentStr . $extraIndentStr, $argIdx == count($this->args()));
}
......
......@@ -43,7 +43,7 @@ class TokenDefinition {
return $matchTxt;
}
public function __toString() {
return '<' . $this->name() . ">\n";
return '<' . $this->name() . '>';
}
}
......@@ -67,7 +67,7 @@ class TokenInstance {
public function match() { return substr($this->_text, $this->position(), $this->length()); }
public function __toString() {
return '<' . $this->definition()->name() . ':' . $this->match() . ">\n";
return '<' . $this->definition()->name() . ':' . $this->match() . '>';
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment