branch: elpa/scala-mode commit e3f91eb5d84df25506095e02f57bfa51dc57c94e Author: Erik Osheim <d...@plastic-idolatry.com> Commit: Erik Osheim <d...@plastic-idolatry.com>
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)