vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit a50a6916a05f21cc326adadecffa7a025e9ca74d parent e87db4adcd3be70a559a65e523714b5cfe6ef865 Author: Murray <murray.calavera@gmail.com> Date: Sat, 12 May 2018 18:14:35 +0100 lexers: handle pony triple quoted strings properly Diffstat:
| M | lua/lexers/pony.lua | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lua/lexers/pony.lua b/lua/lexers/pony.lua @@ -19,8 +19,10 @@ local annotation = token(l.PREPROCESSOR, l.delimited_range('\\', false, true)) local lit_bool = token(l.CONSTANT, pword{'true', 'false'}) +local nq = l.any - P'"' local lit_str = token(l.STRING, - l.delimited_range('"') -- this covers triple quoted strings + P'"""' * (nq + (P'"' * #(nq + (P'"' * nq))))^0 * P'"""' + + l.delimited_range('"') + l.delimited_range("'") )