New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(compiler): allow asserting matching identifier names #22835
Conversation
You can preview 7acde39 at https://pr22835-7acde39.ngbuilds.io/. |
You can preview d51c1ff at https://pr22835-d51c1ff.ngbuilds.io/. |
You can preview c302143 at https://pr22835-c302143.ngbuilds.io/. |
|
||
if (pieces.length === 0 || TOKEN.lastIndex !== 0) { | ||
const from = TOKEN.lastIndex; | ||
const to = from + 30; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why "+30"? use a const for magic numbers ;)
} | ||
} | ||
|
||
const IDENT_LIKE = /^[a-z][A-Z]/; | ||
const SPECIAL_RE_CHAR = /\/|\(|\)|\||\*|\+|\[|\]|\{|\}|\$/g; | ||
function r(...pieces: (string | RegExp)[]): RegExp { | ||
function r(pieces: (string | RegExp)[]): {regexp: RegExp, groups: Map<string, number>} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is r
doing? Any reason for a single letter name? Or maybe add a comment that explains what the function does
You can preview 88db204 at https://pr22835-88db204.ngbuilds.io/. |
Need to be rebased once master is green (the failures are not related to the changes in this PR). |
You can preview dc3af82 at https://pr22835-dc3af82.ngbuilds.io/. |
master is green but affected by sauce-labs flakes :-( |
You can preview 092f142 at https://pr22835-092f142.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
We will need to assert identifier names for i18n (
/MSG_[A-Z_]+/
)