commit | af5fc2d4d226ceee5f4bd624f567090d53282071 | [log] [tgz] |
---|---|---|
author | Stevie Strickland <sstrickl@google.com> | Tue Mar 19 10:40:15 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Tue Mar 19 10:40:15 2019 +0000 |
tree | 0ed4a1dffb93ffce88946082595a200a85d8c201 | |
parent | efb3f85c7e9c1537e275765d11ad8de9f5282da5 [diff] |
[VM] Partial support for named regexp captures. See https://github.com/tc39/proposal-regexp-named-groups for a high-level description of the feature and examples. This is one of the features requested in https://github.com/dart-lang/sdk/issues/34935. This is a partial implementation because while there is a way to retrieve groups via Dart by name, it requires casting the returned Match to the new RegExpMatch interface to avoid changing the RegExp interface. Changing the RegExp interface will happen in a future update, since there are other planned changes to the RegExp interface coming soon and that way we only change it once. See https://github.com/dart-lang/sdk/issues/36171 for more details on the planned changes. Also, since only BMP regular expressions are supported, not full Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME> will only be parsed as a named back reference if there are named captures in the string. Otherwise, the \k will be parsed as the identity escape for backwards compatibility. The new tests illustrate this difference. Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461 Commit-Queue: Stevie Strickland <sstrickl@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Jenny Messerly <jmesserly@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.