emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 6037c0f 04/45: Add support for 'u' and 'y' RegExp flags in


From: Dmitry Gutov
Subject: [elpa] master 6037c0f 04/45: Add support for 'u' and 'y' RegExp flags in ES6 mode.
Date: Mon, 02 Feb 2015 03:18:33 +0000

branch: master
commit 6037c0fd60411b045f15adc84dfbbc3f2a0b99ba
Author: Stephen Hicks <address@hidden>
Commit: Stephen Hicks <address@hidden>

    Add support for 'u' and 'y' RegExp flags in ES6 mode.
    
    These flags are defined in §12.2.7.1 of the draft spec: 
http://people.mozilla.org/\~jorendorff/es6-draft.html\#sec-primary-expression-regular-expression-literals-static-semantics-early-errors
 (narrowing the RegularExpressionFlags production defined in §11.8.5).  The new 
flags are described at https://mathiasbynens.be/notes/es6-unicode-regex.
---
 js2-mode.el |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index b52f947..33d45bd 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -5958,6 +5958,12 @@ its relevant fields and puts it into `js2-ti-tokens'."
           (push ?i flags))
          ((js2-match-char ?m)
           (push ?m flags))
+         ((and (js2-match-char ?u)
+               (>= js2-language-version 200))
+          (push ?u flags))
+         ((and (js2-match-char ?y)
+               (>= js2-language-version 200))
+          (push ?y flags))
          (t
           (setq continue nil))))
       (if (js2-alpha-p (js2-peek-char))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]