Giter VIP home page Giter VIP logo

Comments (8)

udoprog avatar udoprog commented on September 26, 2024

Could you elaborate? I don't understand what this issue relates to.

from rune.

ModProg avatar ModProg commented on September 26, 2024

quote!(something?;) throws this error.

from rune.

udoprog avatar udoprog commented on September 26, 2024

Can you reproduce the exact error here for reference?

from rune.

ModProg avatar ModProg commented on September 26, 2024
error: unsupported punctuation
  --> src/env.rs:47:30
   |
47 |         rune::macros::quote!(?;);
   |                              ^

from rune.

ModProg avatar ModProg commented on September 26, 2024

I expect the reason is that quote parses all punctuation that is Spacing::Joint as one tt, but it should be two in this case.

from rune.

udoprog avatar udoprog commented on September 26, 2024

Right, so yeah, it's an error we raise:

return Err(syn::Error::new(punct.span(), "unsupported punctuation"));

So we need to fix it, somehow :)

from rune.

udoprog avatar udoprog commented on September 26, 2024

So a way to do this would be to improve kind_from_punct to process more than one punctuation in case it's a joint composite which can actually be decomposed into multiple punctuations. Since both ? and ; are already separate punctuations.

from rune.

ModProg avatar ModProg commented on September 26, 2024

I have a list of the conditions to parse rust tts from joint tokens here:
https://github.com/ModProg/proc-macro-utils/blob/196525b066a3b5f8d751da6e7574731790827bb3/src/parser.rs#L1047

from rune.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.