commit | 5aba7b7b85e9b7dcb275ea06dd485b3f97da9175 | [log] [tgz] |
---|---|---|
author | Paul Berry <paulberry@google.com> | Fri Feb 22 13:39:46 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Fri Feb 22 13:39:46 2019 +0000 |
tree | c0a083aa0d0534c9ab352d09b37c1ea602c0222b | |
parent | ff265bb5ae1b5b13d71d553a0ee02115294093b4 [diff] |
Normalize expression precedence between analyzer and front_end. Several places in the analyzer and the analysis server were using hardcoded integers to represent precedence, rather than referring to constants defined in the front_end. This led to some subtle off-by-one errors, because the old analyzer convention (prior to integration with the front_end parser) used 0 to represent the lowest precedence of an expression (and -1000 to represent the precedence of non-expressions), whereas the front_end convention is for 1 to represent the lowest precedence of an expression. As far as I can tell there was no user visible impact, but it made it very difficult to reason about operator precedence. This CL updates the analyzer and the analysis server so that they don't hardcode any precedence values; instead they refer to named constants in the front end. In a follow-up CL I'll reduce some hardcoded precedence numbers in the front end itself. Change-Id: Id3869afeb83042cc7d6630a0a4a0533a07058736 Reviewed-on: https://dart-review.googlesource.com/c/93964 Reviewed-by: Konstantin Shcheglov <scheglov@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.