Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min and max #29

Open
thorade opened this issue Nov 30, 2015 · 7 comments
Open

min and max #29

thorade opened this issue Nov 30, 2015 · 7 comments

Comments

@thorade
Copy link
Collaborator

thorade commented Nov 30, 2015

Another minor mismatch:
In the following code example, min and maxshould have the same colour as quantity and unit.

type Efficiency = Real (
    final quantity="Efficiency",
    final unit="1",
    min=0,
    max=1);
@bilderbuchi
Copy link

This apparently broke some time between 0.2.1 (where it was working) and 0.3.0.

@bilderbuchi
Copy link

OK, it was 38a8b43 that broke it (which makes sense). Did this work with Boris' grammar?

@thorade
Copy link
Collaborator Author

thorade commented Dec 1, 2015

We replaced Raphaels grammar (v0.2.1) with Boris' grammar (v0.3.1). With Raphaels version, the min and max have the same color as the "final" keyword. Do you see what line of the grammar is responsible for the highlighting?

@bilderbuchi
Copy link

ah, of course, my bad, I didn't look closely enough. :-/
Presumably, it's because of these lines.

@bilderbuchi
Copy link

argh, min is also in here :-/

@thorade
Copy link
Collaborator Author

thorade commented Dec 1, 2015

One idea: all function calls use parantheses. So maybe we can search for min( and min ( instead of just min. And so on. Or are there functions that do not take an argument (and can thus be called without parantheses)?
Or maybe just change it for minand max. These two take an argument for sure.

@bilderbuchi
Copy link

Or are there functions that do not take an argument (and can thus be called without parantheses)

I am not a Modelica expert, but even functions taking no arguments are (in other languages) typically invoked with func(), not func.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants