* Parse many literals along side idents in names
* Accept ints as literals
We will not accept floats because `123.123` is a float literal,
but `123 .123` is a int literal followed by a class called `123`.
This could be confusing so it will not be accepted.
Ints can have leading zeros, like `0123`, but this is not guarranteed by
the rust compiler to always work, which could cause future errors.
An example would be truncating `001` to `1`.
* Limit accepted literals using existing function
* Update error output for non-string-literal
* Test output of ints with specified type
This outputs exactly what is written, which is the obvious behaviour
* Use nightly version to generate output
Previous verison was not using nightly, causing errors in the automated
test that are using nightly
* Replace "byte_string" with "raw_string" in test
---------
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
# Overview
The following syntax will no longer work:
```rust
html! {
br /
link rel="stylesheet" href="styles.css" /
}
```
This should be changed to the following:
```rust
html! {
br;
link rel="stylesheet" href="styles.css";
}
```
# Rationale
The `;` syntax was introduced in #96; the rationale for it can be found there.
Removing support for the older `/` syntax will simplify the API surface, and allow for the space to be used for other things.
* Add support for Option<T> attributes
Introduces the `attr=[value]` syntax that assumes `value` is an
`Option<T>`. Renders `attr="value"` for `Some(value)` and entirely
omits the attribute for `None`.
Implements and therefore closes#283.
* Call `Generator::splice` directly
* Handle struct literals (edge case)
Co-authored-by: Chris Wong <xbuns@google.com>
Removed references to `std` and replaced them with references to `core` and `alloc`.
Features `rocket` and `iron` still require `std`.
Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
* Use `std::matches!`
- Remove crates.io `matches` in favor of the `std` version
- Fix Clippy warning by changing a `match ... { ... }` to
`matches!(...)`
* Satisfy `blocks_in_if_conditions`
* Add proc_macro2 and quote dependencies
* Completly switch over to proc_macro2 where possible
* Remove unessesary ::from casts
* Remove pendantic cast that i missed
* Make Builder::push_tokens accept TokenStream
* Remove stray commented out code
* Reword unclear comment on `Span` to a todo item
* Move comment closer to its intended line
* Use into instead of explicit conversion