Comments (8)
This is not correct.
Not all *.config files are Rebar configuration files. There are reltool.config, sys.config, etc. So this files should not be marked as "rebar" unless it's "rebar.config" in particular.
It's not tuples. It could be anything that file:consult parses. file.consult parses list of dot terminated terms not tuples:
a.
[x,y].
{z}.
file:consult("x.conf").
{ok,[a,[x,y],{z}]}
from intellij-erlang.
Those are not Erlang files. Those are files with Erlang terms. Current BNF allows expressions like {2+2}. It wont be parsed by file:consult.
I believe for this type of files there should be whole another grammar.
from intellij-erlang.
OK, but at the moment I think that is better to highlight those files. Thought?
from intellij-erlang.
Yes. But as it implemented now it erroneously highlight errors in correct files:
x.
and does not highlight errors with 'correct Erlang':
f() -> x.
And it's not rebar:)
from intellij-erlang.
So, if I now change the grammar to
root ::= form *
form ::= (is_app_config expression) | (!is_app_config erlang_form)
erlang_form ::= function | rule | record_definition | include | macros_definition | attribute
it'll be OK?
from intellij-erlang.
It will allow different kinds of expressions (try, send, assignment, arithmetical) in there which is not allowed by file:consult. There should be terms, not expressions. The only things allowed there are unary '+' and unary '-'.
See https://github.com/erlang/otp/blob/maint/lib/stdlib/src/erl_parse.yrl parse_term() and normalize().
from intellij-erlang.
one other thing - there could be comments inside. This one is perfectly fine
{
x,
%aaaaa
y %xxxxxxx
}.
from intellij-erlang.
BTW there are community provided erlang file types in intellij platform - can you make some moves to make these config go away? They're kinda conflicting with plugin making wrong icons to be shown sometimes.
from intellij-erlang.
Related Issues (20)
- "erl: not found" while trying to setup rebar3 path HOT 2
- Syntax error on `maybe' function in editor HOT 1
- Don't offer some functions from erlang module HOT 1
- red code for some types
- red code
- No docs for OTP modules HOT 2
- Better support for rebar3 HOT 1
- generate documentation with code module HOT 9
- get in trouble: Failed to setup debugger environment HOT 3
- 2023.2 support HOT 1
- Search files lost sdk modules HOT 1
- JpsErlangModelSerializerExtension: JVMCFRE199E bad major version 61.0 HOT 2
- I use erlang remote, but I get an error, what should I do?
- Debugging failed with: Failed to setup debugger environment using Intelij 2023.2.5, OSX 13.5.2 (22G91) HOT 6
- Add support for IntelliJ 2023.3 HOT 11
- intellij-erlang-0.11.1205 don't support intelliJ IDEA IC-233.13135.103 HOT 1
- Beam file in MacOs is not created HOT 2
- new function improve
- Add support for IntelliJ 2024.1
- Can not add SDK on Intellij 2024.1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intellij-erlang.