Giter Club home page Giter Club logo

Comments (6)

jiribenes avatar jiribenes commented on July 20, 2024 3

I propose we use \u<DIGIT>+ for Unicode character literals and likewise \u<DIGIT>+ inside strings, simply because then we can use StringContext.processEscapes for the latter and don't have to take care of it ourselves

Sounds fine to me, at least as a first step, especially if we can reuse StringContext.processEscapes 👍

Given time, we could actually do the super-correct solution of parsing/lexing the escapes ourselves and then storing the escaped version directly (so without any need to call StringContext.processEscapes at all), but I'd be very happy if we could postpone that for later in order to prioritise the merge of #495 :)

from effekt.

dvdvgt avatar dvdvgt commented on July 20, 2024

Some things to consider:

  • What to do about the ANSI escape sequences we currently have here?
  • Related to that, I find it weird that we have character literal syntax of \u{001b} but then also have "\u001b[30m". We should decide on a common notation here.

from effekt.

b-studios avatar b-studios commented on July 20, 2024

The difference is due to the different handling of escapes in backends. The right thing to do is exactly to have one format and then translate it when rendering out in backends.

from effekt.

dvdvgt avatar dvdvgt commented on July 20, 2024

I propose we use \u<DIGIT>+ for Unicode character literals and likewise \u<DIGIT>+ inside strings, simply because then we can use StringContext.processEscapes for the latter and don't have to take care of it ourselves

from effekt.

b-studios avatar b-studios commented on July 20, 2024

@jiribenes you had some opinion on the syntax of escapes, didn't you?

from effekt.

jiribenes avatar jiribenes commented on July 20, 2024

Resolved by #495, tested with repro from #494 (comment) 👍

from effekt.

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.