From 6564cc6788568a509a3fccf875bedf3683b55e2f Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Thu, 15 Mar 2018 22:17:57 +0100 Subject: [PATCH] readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 089d1e6..13c5e68 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ The error message is presented as a `TokenStream` throught the `.emit()` functio For the first case (`lit!(99)`) the parsing succeeded and the returned token stream would amount to the literate integer 99. As our `v` is a `LitInt` we need to convert it into a `TokenStream`, a two stage process by first turning `v` into tokens, from wich we get a token stream. (You may comment out the failing parts and print the value of `_v` to convince yourself.) -For the second and third cases, we see that appropriate errors and spans are reported by the built in parser. However the last case is somewhat unsatisfying, due to the `syn::parse` failing (unwrap on an `Err`). We can handle that as well as follows, for the example `ex_lite.rs`. +For the second and third cases, we see that appropriate errors and spans are reported by the built in parser. However the last case is somewhat unsatisfying, due to the `syn::parse` failing (unwrap on an `Err`). We can improve that as follows, `ex_lite.rs`. ``` rust #![feature(proc_macro)] @@ -191,7 +191,7 @@ pub fn lite(input: TokenStream) -> TokenStream { The description here is the default error, provided by the built in `LitInt` parser. -### Direct approach +## Direct approach /// MyLit struct MyLit { -- GitLab