Comments (6)
I propose we use
\u<DIGIT>+
for Unicode character literals and likewise\u<DIGIT>+
inside strings, simply because then we can useStringContext.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.
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.
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.
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.
@jiribenes you had some opinion on the syntax of escapes, didn't you?
from effekt.
Resolved by #495, tested with repro from #494 (comment) 👍
from effekt.
Related Issues (20)
- Tests for `exception` stdlib. HOT 1
- [To be discussed] Allow match guards as boolean expressions
- Rename constructors of collections HOT 1
- Wrong primitive names in LLVM I/O HOT 2
- String-related problems on the LLVM backend HOT 5
- Top-level constants in the LLVM backend
- `equals` does not work properly in chez Backends
- Convention for error reporting and aborting HOT 1
- Functions outside of the event loop segfault on LLVM
- Overeager JS inliner forgets to parenthesize HOT 1
- Consistently name generated ML binary
- Support for prefix operators HOT 5
- `array::copy(from, start, to, offset, length)` copies one element more
- References escape their region when using `var` HOT 1
- More descriptive comments when generating LLVM from Machine
- Unexpected end of input on opening brace after newline HOT 1
- Existentially quantified types are defined in outer scope HOT 2
- Investigate using memory use markers in the generated LLVM
- Renamer stack-overflows on large test suites HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from effekt.