branch: elpa/dart-mode
commit e820b090c16588baaab475ede1421cf7ff1b5f35
Author: Brady Trainor <[email protected]>
Commit: Brady Trainor <[email protected]>

    Regex catches dollar signs now
    
    Currently, $ has syntax of words, not symbols as _ does. To avoid
    hard-coding on which syntax these have, we simply check for either of
    word-start or symbol-start. That might not be a good fix, but it seems
    to work for now.
---
 dart-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index c40ea01..ab2f3c7 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -396,11 +396,11 @@ Returns nil if `dart-sdk-path' is nil."
                                                        digit)))))
 
 (defun dart--identifier (&optional case)
-  `(and (zero-or-one (or ?$ ?_))
-        bow
+  `(and (or word-start symbol-start)
+        (zero-or-more (any ?$ ?_))
         ,(if case
              case
-           'alnum)
+           'alpha)
         (zero-or-more (or ?$ ?_ alnum))))
 
 (setq dart--metadata-re (rx ?@ (eval (dart--identifier))))

Reply via email to