We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This would be nice as an appendix of the book.
The text was updated successfully, but these errors were encountered:
Here's an initial attempt using EBNF:
markups = { markup } ; markup = literal | special form | element | splice | block ; special form = '@', ( 'if', moelarry, block | 'if', 'let', pattern, '=', moelarry, block | 'while', moelarry, block | 'while', 'let', pattern, '=', moelarry, block | 'for', pattern, 'in', moelarry, block | 'match', moelarry, match body | 'let', pattern, '=', moelarry, block ) ; match body = ... ; (* this is complicated *) element = name, { normal attribute | empty attribute }, ( markup | '/' ) ; name = identifier, { '-', identifier } ; normal attribute = name, '=', attribute value ; attribute value = literal | special form | splice | attribute block ; attribute block = '{', attribute value, '}' ; empty attribute = name, '?', [ '[', expression, ']' ] ; splice = '(', expression, ')' ; block = '{', markups, '}' ; identifier = ? Rust identifier ? ; literal = ? Rust string literal ? ; expression = ? Rust expression ? ; moelarry = ? Rust expression excluding struct literals ? ; pattern = ? Rust pattern ? ;
(See rust-lang/rfcs#1384 (comment) for an explanation of the term "moelarry".)
Seems pretty straightforward, except for the @match syntax (I'm not really familiar with that part of the parser).
@match
Sorry, something went wrong.
I don't think anyone is asking for this.
No branches or pull requests
This would be nice as an appendix of the book.
The text was updated successfully, but these errors were encountered: