David Tolnay

Results 700 comments of David Tolnay

If the caller may want to trigger errors pointing to the brace, they need to be able to access the span of the brace token. ```rust return Err(Error::new(m.brace_token.span, "this error...

Quote is the easiest way. https://github.com/dtolnay/quote ```rust let wrapped = quote! { mod my_mod { #stream } };

I believe the `syn::parse` doc covers this. [If `MyObject::parse` is a Parse impl:](https://docs.rs/syn/0.15.4/syn/parse/index.html#the-synparse-functions) ```rust let tokens = quote! { HelloWorld }; let output: MyObject = syn::parse2(tokens).unwrap(); ``` [Otherwise](https://docs.rs/syn/0.15.4/syn/parse/index.html#the-parser-trait), effectively the...

I am on board with a PartialOrd impl, but I don't think this implementation works. With a `None` delimited group, comparing the following two cursors would give a random answer...

I am not pleased that this implementation adds bookkeeping overhead to every cursor operation (which underlies all parsing) even in programs that never use Speculative. That seems like the wrong...

> cursors can be arbitrarily many `None`-delimited groups deep. In practice they are not. You should be able to efficiently compute the depth of a cursor without using `skip`, by...

As for tests: someday we should organize those but for now you can create a new top-level integration test file in the tests dir. Thanks!

I'd be on board with pursuing a flat representation. I think your assessment is correct that it has odds in favor of performance positive, and obviously it makes PartialOrd easy...

Oh for the flat representation work: make sure to fetch from master since I was poking around in TokenBuffer construction recently, since it had to be paged in for reviewing...