All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.test.jsx.txt Maven / Gradle / Ivy

# Self-closing element {"dialect": "jsx"}



==>

Script(ExpressionStatement(JSXElement(JSXSelfClosingTag(JSXStartTag,JSXBuiltin(JSXIdentifier),JSXSelfCloseEndTag))))

# Regular element {"dialect": "jsx"}

bar

==>

Script(ExpressionStatement(JSXElement(
  JSXOpenTag(JSXStartTag, JSXIdentifier, JSXEndTag),
  JSXText,
  JSXCloseTag(JSXStartCloseTag, JSXIdentifier, JSXEndTag))))

# Fragment {"dialect": "jsx"}

<>bar

==>

Script(ExpressionStatement(JSXElement(
  JSXFragmentTag(JSXStartTag, JSXEndTag),
  JSXText,
  JSXCloseTag(JSXStartCloseTag, JSXEndTag))))

# Namespaced name {"dialect": "jsx"}



==>

Script(ExpressionStatement(JSXElement(
  JSXSelfClosingTag(JSXStartTag,JSXNamespacedName(JSXIdentifier, JSXIdentifier),JSXSelfCloseEndTag))))

# Member name {"dialect": "jsx"}



==>

Script(ExpressionStatement(JSXElement(
  JSXSelfClosingTag(JSXStartTag,JSXMemberExpression(JSXIdentifier, JSXIdentifier),JSXSelfCloseEndTag))))

# Nested tags {"dialect": "jsx"}

text{x} {...y}

==>

Script(ExpressionStatement(JSXElement(
  JSXOpenTag(JSXStartTag, JSXBuiltin(JSXIdentifier), JSXEndTag),
  JSXElement(
    JSXOpenTag(JSXStartTag, JSXMemberExpression(JSXIdentifier, JSXIdentifier), JSXEndTag),
    JSXText,
    JSXCloseTag(JSXStartCloseTag, JSXMemberExpression(JSXIdentifier, JSXIdentifier), JSXEndTag)),
  JSXEscape(VariableName),
  JSXText,
  JSXEscape(Spread, VariableName),
  JSXCloseTag(JSXStartCloseTag, JSXBuiltin(JSXIdentifier), JSXEndTag))))

# Attributes {"dialect": "jsx"}



==>

Script(ExpressionStatement(JSXElement(
  JSXOpenTag(JSXStartTag, JSXIdentifier,
    JSXAttribute(JSXIdentifier, Equals, JSXAttributeValue),
    JSXAttribute(JSXIdentifier),
    JSXSpreadAttribute(Spread, VariableName),
    JSXAttribute(JSXIdentifier, Equals, JSXEscape(VariableName)),
  JSXEndTag),
  JSXCloseTag(JSXStartCloseTag, JSXIdentifier, JSXEndTag))))




© 2015 - 2025 Weber Informatics LLC | Privacy Policy