stil4m / elm-analyse

A tool that allows you to analyse your Elm code, identify deficiencies and apply best practices.
https://stil4m.github.io/elm-analyse/
MIT License
415 stars 56 forks source link

Parsing fails when first identifier after import starts with "as" #190

Open tfausak opened 5 years ago

tfausak commented 5 years ago

This fails:

module Main exposing ( asUndefined )
import Debug
asUndefined : a
asUndefined = Debug.todo "asUndefined"
Messages:
- Main.elm
  > Could not load file due to: Unexpected parse error

Changing the import to import Debug as Debug fixes the problem. So does changing asUndefined to undefined.

This is all with elm-analyse 0.16.1.

ollef commented 5 years ago

I'm guessing this is the same as https://github.com/stil4m/elm-syntax/issues/29.

tfausak commented 5 years ago

Definitely looks that way! Based on that issue, upgrading to elm-syntax at least version 7.0.6 should fix this problem.