-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ee752d
commit 8204e25
Showing
8 changed files
with
159 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
# Convert RSX DSL to AST | ||
## How to convert | ||
# Parser | ||
|
||
## Convert RSX DSL to AST | ||
|
||
```shell | ||
Real AST | ||
----------- --------------- Strategy --------------- | ||
| RSX DSL | --> | ParseTarget | ----------> | ParseResult | | ||
----------- --------------- --------------- | ||
``` | ||
## RSX | ||
|
||
- Template | ||
- Script | ||
- Style | ||
|
||
### Template | ||
|
||
1. Unrestricted tags (tag name is not constrained) | ||
2. There are no styles, only properties, or in other words, all styles are properties | ||
3. Nesting strings in tags is not allowed (example: <view>this is a view</view> ❌) | ||
|
||
### Script | ||
1. Allow Rust syntax | ||
|
||
### Style | ||
|
||
1. bind to tag by name | ||
2. nesting allowed | ||
3. function and bind allowed | ||
## Convert To Makead | ||
|
||
```shell | ||
--------------------------- | ||
| | | ||
------------------------ | MakepadConvertResult | | ||
| AST (in ParseResult) | --------> | | | ||
------------------------ | -------------------- | | ||
------------------------ | | MakepadConverter | | | ||
| File Meta Data | --------> | -------------------- | | ||
------------------------ | | | ||
--------------------------- | ||
| | ||
|------------------→ | | ||
| ↓ | ||
------------ | ---------------- | ||
| Strategy | --------------| | Makepad Code | | ||
------------ ---------------- | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.