isSameJSXElementName example

$children = $this->parseJSXChildren();
            
            if (
                ($startClosingToken = $this->scanner->consume("<")) &&
                $this->scanner->consume("/") &&
                ($closingName = $this->parseJSXIdentifierOrMemberExpression()) &&
                ($endClosingToken = $this->scanner->reconsumeCurrentTokenInJSXMode()) &&
                ($endClosingToken->value === ">")
            ) {
                $this->scanner->consumeToken();
                if (!$this->isSameJSXElementName($name$closingName)) {
                    $this->error("Closing tag does not match opening tag");
                }
            } else {
                $this->error();
            }
            
        }
        
        //Opening tag         $openingNode = $this->createJSXNode(
            "JSXOpeningElement",
            
Home | Imprint | This part of the site doesn't use cookies.