wi11dey / JSX.lua

Pure and complete Lua converter from JSX/TSX to JavaScript or TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSX.lua

Pure Lua converter from JSX/TSX to JavaScript or TypeScript using LPeg

Example

jsx:match([[
  return (
    <button onClick={() => this.setState({ liked: true })}>
      Like
    </button>
  );
]])

-- Returns: 
-- [[
--   return (
--     React.createElement("button", {"onClick": (() => this.setState({ liked: true }))}, "Like")
--   );
-- ]]

About

Pure and complete Lua converter from JSX/TSX to JavaScript or TypeScript

License:GNU Affero General Public License v3.0


Languages

Language:Lua 100.0%