fixed negative literal issue

This commit is contained in:
Dmitry Zuikov 2023-02-17 20:54:46 +03:00
parent 995e1cd52c
commit b017bc1e9d
5 changed files with 55 additions and 2 deletions

View File

@ -7,5 +7,44 @@ fixme-prefix FIXME: bugs issues ; defines a fixme entity and it's cate
fixme-files doc/devlog **/*.hs
fixme-files-ignore .direnv/** dist-newstyle/**
fixme-attribs assigned workflow resolution asap
fixme-value-set workflow new backlog wip test fixed done
fixme-value-set asap asap
[ fixme-report all json
(render builtin:microstache report-wip.tpl)
(post builtin:columns | 10 10 8 10 _)
(query ~workflow:backlog)
; (query ?workflow:wip)
; (query ?workflow:test)
]
[ fixme-report wip json
(render builtin:microstache report-wip.tpl)
(post builtin:columns | 10 10 8 10 _)
(query ?workflow:test)
(query ?workflow:wip)
(query ?workflow:fixed)
]
[ fixme-report backlog json
(render builtin:microstache report-wip.tpl)
(post builtin:columns | 10 10 8 10 _)
(query workflow:backlog)
]
;; it's perfectly possible to override default
;; reports. do it on your own risk
( fixme-report builtin:list-brief json
(render builtin:microstache report-wip.tpl)
(post builtin:columns | 10 10 8 10 _)
)
[ fixme-report wip-json json
]

4
.fixme/log Normal file
View File

@ -0,0 +1,4 @@
;; This is a log file. All fixmies status updates go here
fixme-set "workflow" "done" "9QfPgLHLSw"

3
.fixme/report-wip.tpl Normal file
View File

@ -0,0 +1,3 @@
{{#items}}
{{&id}}|[{{&workflow}}]|{{&tag}}|{{&assigned}}|{{&title}}
{{/items}}

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
dist-newstyle/
.direnv/
.fixme/state.db

View File

@ -82,17 +82,23 @@ intLit sp = L.lexeme sp $ do
dec'= signed sc L.decimal
symbolChars :: [Char]
symbolChars = "!$%&|*+-/:<=>?@^_~#.'"
symbolChars = "-!$%&|*+/:<=>?@^_~#.'"
symbolChar :: Parser Char
symbolChar = oneOf symbolChars
symbolCharNoMinus :: Parser Char
symbolCharNoMinus = oneOf symbolChars'
where
symbolChars' = dropWhile (== '-') symbolChars
-- FIXME: position!
symbol :: forall c . MegaConstraints c
=> Parser () -> Parser (Syntax c)
symbol sp = L.lexeme sp $ do
co <- MegaContext . Just <$> getOffset
h <- letterChar <|> symbolChar
h <- letterChar <|> symbolCharNoMinus
-- FIXME: dont-start-symbol-with-minus
t <- many (letterChar <|> digitChar <|> symbolChar)
case h:t of
"#t" -> pure $ Literal co (mkLit True)