Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement RegExp 'v' flag, part 1 #229

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

bnoordhuis
Copy link
Contributor

This commit implements the flag itself and teaches the regex engine to reject previously accepted patterns when in unicodeSets mode.

Refs: #228

This commit implements the flag itself and teaches the regex engine to
reject previously accepted patterns when in unicodeSets mode.

Refs: quickjs-ng#228
@bnoordhuis bnoordhuis merged commit f0ef9e1 into quickjs-ng:master Dec 21, 2023
@bnoordhuis bnoordhuis deleted the regexp-v-p1 branch December 21, 2023 18:37
@@ -864,17 +868,43 @@ static int re_parse_char_class(REParseState *s, const uint8_t **pp)
cr_init(cr, s->opaque, lre_realloc);
p = *pp;
p++; /* skip '[' */

if (s->unicode_sets) {
static const char verboten[] =
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it german? 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or Dutch ;-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it german? 😅

To make it sound more affirmative? Using the French interdit would definitely sound less absolute.

As explained in this quote is attributed to Sir Winston Churchill:

In England, everything is permitted except what is forbidden.
In Germany, everything is forbidden except what is permitted.
In France, everything is allowed, even what is prohibited.
In the USSR, everything is prohibited, even what is permitted.

Copy link
Collaborator

@chqrlie chqrlie Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or Dutch ;-)

No, it would be verboden in Dutch, unless a local dialect in the northern part of Holland is closer to German.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dialect around here is in fact very close to Low German but really the reason I used "verboten" is because I'm a big fan of German as spoken (well...) in that one scene from the movie Der Untergang :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but really the reason I used "verboten" is because I'm a big fan of German

Okay 😂 Nice one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dann können wir hier auf Deutsch diskutieren. Kannst to auch Saúl ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No chance 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tut mir Leid... let's switch back to the lingua franca :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na gut, akzeptiert xD

@Mqxx
Copy link

Mqxx commented Mar 12, 2024

@saghul

@saghul
Copy link
Contributor

saghul commented Mar 12, 2024

?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants