branch: elpa/lua-mode
commit cc4676328a27c2abcf0b11d2c67e8b6b5ea5fcf3
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
Add some comments
---
lua-mode.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lua-mode.el b/lua-mode.el
index 0e0c9fc..96750a8 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -550,6 +550,11 @@ Returns final value of point as integer or nil if
operation failed."
"-+*/^.=<>~"))
(defconst lua-cont-eol-regexp
+ "Regexp that matches the ending of a line that needs continuation
+
+This regexp starts from eol and looks for a binary operator or an unclosed
+block intro (i.e. 'for' without 'do' or 'if' without 'then') followed by
+an optional whitespace till the end of the line."
(eval-when-compile
(concat
"\\(\\_<"
@@ -564,6 +569,12 @@ Returns final value of point as integer or nil if
operation failed."
(defconst lua-cont-bol-regexp
+ "Regexp that matches a line that continues previous one
+
+This regexp means, starting from point there is an optional whitespace followed
+by Lua binary operator. Lua is very liberal when it comes to continuation line,
+so we're safe to assume that every line that starts with a binop continues
+previous one even though it looked like an end-of-statement."
(eval-when-compile
(concat
"\\=\\s *"