File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ shelltestfile = do
7272 trailingComments <- many whitespaceorcommentline
7373 ptrace_ " shelltestfile 2"
7474 eof
75- let ts' = init ts ++ [( last ts) { trailingComments = trailingComments }]
75+ let ts' = appendTrailingComments trailingComments ts
7676 ptrace " shelltestfile ." ts'
7777 return ts'
7878
@@ -328,6 +328,11 @@ delimiterNotNewTest3 = do
328328----------------------------------------------------------------------
329329-- common
330330
331+ appendTrailingComments :: [String ] -> [ShellTest ] -> [ShellTest ]
332+ appendTrailingComments _ [] = [] -- in this case, trailing comment are discarded
333+ appendTrailingComments cs ts =
334+ init ts ++ [(last ts) { trailingComments = cs }]
335+
331336linesBetween :: [String ] -> [String ] -> Parser String
332337linesBetween startdelims enddelims = do
333338 let delimp " " = string " "
You can’t perform that action at this time.
0 commit comments