aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormitchell <unknown>2018-10-24 18:16:35 -0400
committermitchell <unknown>2018-10-24 18:16:35 -0400
commit80e96adb41cf8ae63dfd8924b04d548fbfb79297 (patch)
treedab28cd3b4d4f9b99ca2fcc81cdb60ceecf75c90
parent4551cce1b06a448c88d7edf0c231ad7cb57b281e (diff)
downloadscintilla-mirror-80e96adb41cf8ae63dfd8924b04d548fbfb79297.tar.gz
lexlua: Tweaked newline pattern to be more syntactically accurate.
-rw-r--r--lexlua/lexer.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/lexer.lua b/lexlua/lexer.lua
index 30bf25b1d..6e47f74d2 100644
--- a/lexlua/lexer.lua
+++ b/lexlua/lexer.lua
@@ -894,7 +894,7 @@ local M = {}
-- A pattern that matches any whitespace character ('\t', '\v', '\f', '\n',
-- '\r', space).
-- @field newline (pattern)
--- A pattern that matches any set of end of line characters.
+-- A pattern that matches a sequence of end of line characters.
-- @field nonnewline (pattern)
-- A pattern that matches any single, non-newline character.
-- @field nonnewline_esc (pattern)
@@ -1596,7 +1596,7 @@ M.print = lpeg_R(' ~')
M.punct = lpeg_R('!/', ':@', '[\'', '{~')
M.space = lpeg_S('\t\v\f\n\r ')
-M.newline = lpeg_S('\r\n\f')^1
+M.newline = P('\r')^-1 * '\n'
M.nonnewline = 1 - M.newline
M.nonnewline_esc = 1 - (M.newline + '\\') + '\\' * M.any