erlang file types

29 views
Skip to first unread message

vladimir....@gmail.com

unread,
Oct 25, 2012, 8:12:44 PM10/25/12
to intellij-...@googlegroups.com
Heya,

There are problematic file types relations implemented now. HRL, APP and TERMS are subclasses of ErlangFileType. The problems are:

1. It's hard to distinguish whether we in HRL or in MODULE without the file extension checking woodoo that is starting to annoy. It's important for inspections.
2. APP and TERMS are not erlang at all. Erlang terms should have separate grammar. Now they both considered erlang and go thru all the inspections and other stuff.

I propose  refactor those into separate file types: HRL and MODULE with ErlangLanguage and write separate grammar for APP and TERMS. There are different TERM files in erlang (reltool.config, etc) and there are different inspections, completions, etc for them to be made.

--
VK

Sergey Ignatov

unread,
Oct 26, 2012, 6:29:56 AM10/26/12
to intellij-...@googlegroups.com
Hi, Vladimir

1. We can allow inspections only for ErlangFileType.MODULE for example in ErlangBaseInspection#checkFile.
2. We can rewrite those grammars after, not now. For me it's not a big problem that APP and TERMS file types use the ErlangParser for parsing.
Reply all
Reply to author
Forward
0 new messages