File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 6666 if " string" == _exp_0 or DelayedLine == _exp_0 then
6767 line_no = line_no + 1
6868 out [line_no ] = posmap [i ]
69- elseif " table " == _exp_0 then
69+ elseif Lines == _exp_0 then
7070 local _
7171 _ , line_no = l :flatten_posmap (line_no , out )
72+ else
73+ error (" Unknown item in Lines: " .. tostring (l ))
7274 end
7375 end
7476 return out , line_no
101103 end
102104 insert (buffer , " \n " )
103105 local last = l
104- elseif " table " == _exp_0 then
106+ elseif Lines == _exp_0 then
105107 l :flatten (indent and indent .. indent_char or indent_char , buffer )
108+ else
109+ error (" Unknown item in Lines: " .. tostring (l ))
106110 end
107111 end
108112 return buffer
Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ class Lines
4545 when " string" , DelayedLine
4646 line_no += 1
4747 out[ line_no] = posmap[ i]
48- when " table "
48+ when Lines
4949 _, line_no = l\ flatten_posmap line_no, out
50+ else
51+ error " Unknown item in Lines: #{l}"
5052
5153 out, line_no
5254
@@ -72,8 +74,10 @@ class Lines
7274
7375 insert buffer, " \n "
7476 last = l
75- when " table " -- Lines
77+ when Lines
7678 l\ flatten indent and indent .. indent_char or indent_char, buffer
79+ else
80+ error " Unknown item in Lines: #{l}"
7781 buffer
7882
7983 __tostring : =>
You can’t perform that action at this time.
0 commit comments