Skip to content

Parens () inside of {} causes a syntax error when passed through JSXTransformer #116

@jeffreylin

Description

@jeffreylin

This happens in both JSXTransformer 0.3.0 and 0.3.2

Something like:

/** @jsx React.DOM */
      <div
        a={(1)}  // BAD: this works only if you remove the parens here.
        b={2}
      >
        hi2u!
      </div>

Gets transformed into:

/** @jsx React.DOM */
      React.DOM.div(
        {a:(1,)  // BAD: SYNTAX ERROR
        b:2}, null
      )

Test/demo case at:
http://jsfiddle.net/mvD4f/2/

I think this might be related to the {/* this fails currently */} issue at #82

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions