YAML 编译器
- 开始日期:2023-08-14
- 目标主要版本:1.x
- 参考问题:
- 实现 PR:
概括
增加 YAML 编译器,用于将 YAML 编译为 C 代码。
基本示例
示例 XML 文件内容:
name: lcui-app
children:
- name: resource
attributes:
type: text/css
src: home.css
- name: resource
attributes:
type: application/font-ttf
src: iconfont.ttf
- name: ui
children:
- name: text
children:
- type: text
text: Enter a message and save it.
- name: textedit
attributes:
ref: input-message
placeholder: "eg: hello, world!"
- name: button
attributes:
ref: btn-save-message
children:
- type: text
text: Save
- name: text
attributes:
ref: feedback
class: feedback
children:
- type: text
text: Message has been saved!
示例 CSS 文件内容:
root {
background-color: #f6f8fa;
}
.feedback {
color: #28a745;
font-size: 12px;
margin-top: 5px;
}