branch: elpa/scala-mode commit 89c71386a98a85e07ecbe0ba2265dd4d06a6c11e Merge: cc2db35 e3f91eb Author: Heikki Vesalainen <heikki.vesalai...@iki.fi> Commit: Heikki Vesalainen <heikki.vesalai...@iki.fi>
Merge pull request #52 from non/topic/octal-escapes octal escapes for chars and strings --- scala-mode2-syntax.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scala-mode2-syntax.el b/scala-mode2-syntax.el index 0ffe960..c955ddc 100644 --- a/scala-mode2-syntax.el +++ b/scala-mode2-syntax.el @@ -74,14 +74,19 @@ ;; Escape Sequences (Chapter 1.3.6) (defconst scala-syntax:escapeSequence-re "\\\\['btnfr\"\\\\]") +;; Octal Escape Sequences (Chapter 1.3.6) +(defconst scala-syntax:octalEscape-re (concat "\\\\[" scala-syntax:octalDigit-group "\\]\\{1,3\\}")) + ;; Character Literals (Chapter 1.3.4) (defconst scala-syntax:characterLiteral-re (concat "\\('\\)\\(" "[^\\\\]" ;; should be just printable char, but this is faster "\\|" scala-syntax:escapeSequence-re + "\\|" scala-syntax:octalEscape-re "\\|" scala-syntax:UnicodeEscape-re "\\)\\('\\)")) (defconst scala-syntax:string-escape-re (concat scala-syntax:escapeSequence-re + "\\|" scala-syntax:octalEscape-re "\\|" scala-syntax:UnicodeEscape-re)) ;; String Literals (Chapter 1.3.5)