dart-lang / dart-syntax-highlight

Tools and documentation for how Dart code is formatted
BSD 3-Clause "New" or "Revised" License
22 stars 11 forks source link

Allow ? and ! in function before ( in function identifiers #24

Closed DanTup closed 2 years ago

DanTup commented 2 years ago

This came up in https://github.com/Dart-Code/Dart-Code/issues/3888. Function invocations that have ? or ! were not being classified as functions. This change allows either of those to appear just before the ( and still be treated as a function identifier.

Before:

Screenshot 2022-03-28 at 18 48 42

After:

Screenshot 2022-03-28 at 18 48 57

(@devoncarew I'm not sure if someone suitable gets notifications of PRs here, if they are and shouldn't ping you, lmk!)