sim: support "--" as comment
Using this in my sim files that are also mdwn files to avoid comments being displayed as headers.
This commit is contained in:
parent
dc6c0f0f1f
commit
6a95e4edad
6 changed files with 24 additions and 22 deletions
|
@ -27,7 +27,8 @@ parseSimFile = go [] . lines
|
|||
|
||||
parseSimFileLine :: String -> Either String SimCommand
|
||||
parseSimFileLine s
|
||||
| "#" `isPrefixOf` s = Right (CommandComment s)
|
||||
| "#" `isPrefixOf` s || "--" `isPrefixOf` s =
|
||||
Right (CommandComment s)
|
||||
| all isSpace s = Right (CommandBlank)
|
||||
| otherwise = parseSimCommand (words s)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue