/**
* Parses a jsx child
*
* @return \Peast\Syntax\Node\Node|null
*/
protected function parseJSXChild() { if ($node =
$this->
parseJSXText()) { return $node;
} elseif ($node =
$this->
parseJSXFragment()) { return $node;
} elseif($node =
$this->
parseJSXElement()) { return $node;
} elseif ($startToken =
$this->scanner->
consume("{"
)) { $spread =
$this->scanner->
consume("..."
);
$exp =
$this->
parseAssignmentExpression();
$midPos =
$this->scanner->
getPosition();
if (($spread && !
$exp) || !
$this->scanner->
consume("}"
)) { $this->
error();
} $node =
$this->
createJSXNode( $spread ? "JSXSpreadChild" : "JSXExpressionContainer",
$startToken );