fix(library/init/lean/parser/module): use updateLeading

This commit is contained in:
Leonardo de Moura 2019-08-08 10:45:15 -07:00
parent 74c46d2b35
commit 10a8822ac5

View file

@ -111,7 +111,8 @@ partial def parseFileAux (env : Environment) (ctx : ParserContextCore) : ModuleP
| (stx, state, msgs) =>
if isEOI stx then
if msgs.isEmpty then
pure (mkListNode stxs)
let stx := mkListNode stxs;
pure stx.updateLeading
else do
msgs.toList.mfor $ fun msg => IO.println msg;
throw (IO.userError "failed to parse file")