百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

syn-rsx

> 前端框架
开源

基于同步的解析器,用于类似 JSX 的 TokenStream

188 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

基于同步的解析器,用于类似 JSX 的 TokenStream

syn-rsx

syn-powered parser for JSX-like TokenStreams, aka RSX. The parsed result is a nested Node structure, similar to the browser DOM, where node name and value are syn expressions to support building proc macros.

…

You might want to check out the html-to-string-macro example as well.

Features

  • Not opinionated

    Every tag or attribute name is valid

    xml
  • Text nodes

    Support for unquoted text is planned.

    xml
    
    
  • Node names separated by dash, colon or double colon

    xml
    
    
  • Node names with reserved keywords

    xml
  • Doctypes, Comments and Fragments

    xml
    
    
    <>
  • Braced blocks are parsed as arbitrary Rust code

    xml
    
    
    
    
    
       | |__________________^
  • Customization

    A ParserConfig to customize parsing behavior is available, so if you have slightly different requirements for parsing and it's not yet customizable feel free to open an issue or pull request to extend the configuration.

    One highlight with regards to customization is the transform_block configuration, which takes a closure that receives raw block content as ParseStream and lets you optionally convert it to a TokenStream. That makes it possible to have custom syntax in blocks. More details in #9

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rusthtmljsxmacrosrsx

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架