Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | fix docs AGAIN |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b83959289404e56840d0057f36b79c97 |
User & Date: | lexi 2019-05-25 06:44:23 |
Context
2019-05-25
| ||
06:45 | fix docs AGAIN check-in: cf358f5850 user: lexi tags: trunk | |
06:44 | fix docs AGAIN check-in: b839592894 user: lexi tags: trunk | |
06:43 | fix docs check-in: d08ee0edd6 user: lexi tags: trunk | |
Changes
Changes to README.md.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
this should be fairly straightforward to understand. there are three exceptions, and these both have to do with how scml handles attributes, which have no straightforward s-exp equivalent.
we'll start with the easier one. the form `(- …)` is used to create tags that do not have bodies. the `<meta>` tag is one such tag. attributes and values are supplied after the name of the tag consed together, e.g. `(key . "value")`. for instance, `<input name="user" type="text">` translates to `(- input (name . "user") (type . "text"))`.
> **note:** the Chicken Scheme reader (the function that transforms text into s-expressions),
> along with many other Scheme readers, allows the use of brackets beyond mere parentheses.
> while it is less strictly portable, you can use your choice of brackets to make code more
> readable, perhaps setting off attribute lists with `[ … ]` and code blocks as `{% … } {@ … }`
> `{= …}`, or any other style that works best for you. e.g.:
normal tags can take attributes too; in fact, the `(- …)` form is simply syntactic sugar for the full form. consider the HTML element `<textarea name="desc">description</textarea>` - we can express this in scml as `((textarea (name . "desc")) "description")`. in other words, if the first term of a list is another list, the compiler interprets it as the tag followed by an attribute list.
"boolean" attributes can also be encoded this way. rather than using a cons pair, you can simply enter them into the attribute list as symbols. this enables us to write a `<!doctype html>` declaration using one of two constructs
((!doctype html)) ; no semantic sugar
|
| |
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
this should be fairly straightforward to understand. there are three exceptions, and these both have to do with how scml handles attributes, which have no straightforward s-exp equivalent.
we'll start with the easier one. the form `(- …)` is used to create tags that do not have bodies. the `<meta>` tag is one such tag. attributes and values are supplied after the name of the tag consed together, e.g. `(key . "value")`. for instance, `<input name="user" type="text">` translates to `(- input (name . "user") (type . "text"))`.
> **note:** the Chicken Scheme reader (the function that transforms text into s-expressions),
> along with many other Scheme readers, allows the use of brackets beyond mere parentheses.
> while it is less strictly portable, you can use your choice of brackets to make code more
> readable, perhaps setting off attribute lists with `[ … ]` and code blocks as `{% … }` `{@ … }`
> `{= …}`, or any other style that works best for you. e.g.:
normal tags can take attributes too; in fact, the `(- …)` form is simply syntactic sugar for the full form. consider the HTML element `<textarea name="desc">description</textarea>` - we can express this in scml as `((textarea (name . "desc")) "description")`. in other words, if the first term of a list is another list, the compiler interprets it as the tag followed by an attribute list.
"boolean" attributes can also be encoded this way. rather than using a cons pair, you can simply enter them into the attribute list as symbols. this enables us to write a `<!doctype html>` declaration using one of two constructs
((!doctype html)) ; no semantic sugar
|