Skip to content

Commit d3a82ed

Browse files
Provide Syntax Checking for Regular Expressions
1 parent 9f9a72a commit d3a82ed

File tree

1,081 files changed

+9300
-4065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,081 files changed

+9300
-4065
lines changed

src/compiler/diagnosticMessages.json

+152-4
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,154 @@
16251625
"category": "Error",
16261626
"code": 1495
16271627
},
1628+
"'\\{0}' is not a valid character escape.": {
1629+
"category": "Error",
1630+
"code": 1496
1631+
},
1632+
"Unknown regular expression flag.": {
1633+
"category": "Error",
1634+
"code": 1497
1635+
},
1636+
"Duplicate regular expression flag.": {
1637+
"category": "Error",
1638+
"code": 1498
1639+
},
1640+
"This regular expression flag is only available when targeting '{0}' or later.": {
1641+
"category": "Error",
1642+
"code": 1499
1643+
},
1644+
"The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.": {
1645+
"category": "Error",
1646+
"code": 1500
1647+
},
1648+
"Named capturing groups are only available when targeting 'ES2018' or later.": {
1649+
"category": "Error",
1650+
"code": 1501
1651+
},
1652+
"Subpattern flags must be present when there is a minus sign.": {
1653+
"category": "Error",
1654+
"code": 1502
1655+
},
1656+
"Incomplete quantifier. Digit expected.": {
1657+
"category": "Error",
1658+
"code": 1503
1659+
},
1660+
"Numbers out of order in quantifier.": {
1661+
"category": "Error",
1662+
"code": 1504
1663+
},
1664+
"There is nothing available for repetition.": {
1665+
"category": "Error",
1666+
"code": 1505
1667+
},
1668+
"Unexpected '{0}'. Did you mean to escape it with backslash?": {
1669+
"category": "Error",
1670+
"code": 1506
1671+
},
1672+
"This regular expression flag cannot be toggled within a subpattern.": {
1673+
"category": "Error",
1674+
"code": 1507
1675+
},
1676+
"'\\k' must be followed by a capturing group name enclosed in angle brackets.": {
1677+
"category": "Error",
1678+
"code": 1508
1679+
},
1680+
"'\\q' is only available inside character class.": {
1681+
"category": "Error",
1682+
"code": 1509
1683+
},
1684+
"'\\c' must be followed by an ASCII letter.": {
1685+
"category": "Error",
1686+
"code": 1510
1687+
},
1688+
"Undetermined character escape.": {
1689+
"category": "Error",
1690+
"code": 1511
1691+
},
1692+
"Expected a capturing group name.": {
1693+
"category": "Error",
1694+
"code": 1512
1695+
},
1696+
"Named capturing groups with the same name must be mutually exclusive to each other.": {
1697+
"category": "Error",
1698+
"code": 1513
1699+
},
1700+
"A character class range must not be bounded by another character class.": {
1701+
"category": "Error",
1702+
"code": 1514
1703+
},
1704+
"Range out of order in character class.": {
1705+
"category": "Error",
1706+
"code": 1515
1707+
},
1708+
"Anything that would possibly match more than a single character is invalid inside a negated character class.": {
1709+
"category": "Error",
1710+
"code": 1516
1711+
},
1712+
"Operators must not be mixed within a character class. Wrap it in a nested class instead.": {
1713+
"category": "Error",
1714+
"code": 1517
1715+
},
1716+
"Expected a class set oprand.": {
1717+
"category": "Error",
1718+
"code": 1518
1719+
},
1720+
"'\\q' must be followed by string alternatives enclosed in braces.": {
1721+
"category": "Error",
1722+
"code": 1519
1723+
},
1724+
"A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?": {
1725+
"category": "Error",
1726+
"code": 1520
1727+
},
1728+
"Expected a Unicode property name.": {
1729+
"category": "Error",
1730+
"code": 1521
1731+
},
1732+
"Unknown Unicode property name.": {
1733+
"category": "Error",
1734+
"code": 1522
1735+
},
1736+
"Expected a Unicode property value.": {
1737+
"category": "Error",
1738+
"code": 1523
1739+
},
1740+
"Unknown Unicode property value.": {
1741+
"category": "Error",
1742+
"code": 1524
1743+
},
1744+
"Expected a Unicode property name or value.": {
1745+
"category": "Error",
1746+
"code": 1525
1747+
},
1748+
"Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.": {
1749+
"category": "Error",
1750+
"code": 1526
1751+
},
1752+
"Unknown Unicode property name or value.": {
1753+
"category": "Error",
1754+
"code": 1527
1755+
},
1756+
"Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.": {
1757+
"category": "Error",
1758+
"code": 1528
1759+
},
1760+
"'\\{0}' must be followed by a Unicode property value expression enclosed in braces.": {
1761+
"category": "Error",
1762+
"code": 1529
1763+
},
1764+
"There is no capturing group named '{0}' in this regular expression.": {
1765+
"category": "Error",
1766+
"code": 1530
1767+
},
1768+
"A decimal escape must refer to an existent capturing group. There are only {0} capturing groups in this regular expression.": {
1769+
"category": "Error",
1770+
"code": 1531
1771+
},
1772+
"Decimal escapes are invalid when there are no capturing groups in a regular expression.": {
1773+
"category": "Error",
1774+
"code": 1532
1775+
},
16281776

16291777
"The types of '{0}' are incompatible between these types.": {
16301778
"category": "Error",
@@ -5294,7 +5442,7 @@
52945442
"category": "Error",
52955443
"code": 6258
52965444
},
5297-
"Found 1 error in {0}": {
5445+
"Found 1 error in {0}": {
52985446
"category": "Message",
52995447
"code": 6259
53005448
},
@@ -6276,9 +6424,9 @@
62766424
"category": "Message",
62776425
"code": 6930
62786426
},
6279-
"List of file name suffixes to search when resolving a module." : {
6280-
"category": "Error",
6281-
"code": 6931
6427+
"List of file name suffixes to search when resolving a module.": {
6428+
"category": "Error",
6429+
"code": 6931
62826430
},
62836431

62846432
"Variable '{0}' implicitly has an '{1}' type.": {

0 commit comments

Comments
 (0)