Skip to content

Commit

Permalink
[ fix ] Fix issue parsing __LOC__ arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
dunhamsteve authored and gallais committed May 14, 2023
1 parent 7221c99 commit edc000c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Idris/Parser.idr
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ mutual
<|> lazy fname indents
<|> if_ fname indents
<|> with_ fname indents
<|> debugString fname
<|> do b <- bounds (MkPair <$> simpleExpr fname indents <*> many (argExpr q fname indents))
(f, args) <- pure b.val
pure (applyExpImp (start b) (end b) f (concat args))
Expand Down Expand Up @@ -530,6 +529,7 @@ mutual
pure $ case projs of
[] => root
_ => PPostfixApp (boundToFC fname b) root projs
<|> debugString fname
<|> do b <- bounds (forget <$> some (bounds postfixProj))
pure $ let projs = map (\ proj => (boundToFC fname proj, proj.val)) b.val in
PPostfixAppPartial (boundToFC fname b) projs
Expand Down
2 changes: 2 additions & 0 deletions tests/idris2/basic069/DebugInfo.idr
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ main = do
__LOC__}
"""

putStrLn __FILE__
1 change: 1 addition & 0 deletions tests/idris2/basic069/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ file: DebugInfo
line: 7
col: 24
loc further down the file: File DebugInfo, line 17, characters 11-18
DebugInfo

0 comments on commit edc000c

Please sign in to comment.