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

Add a custom error message for values without attributes in a record #845


Copy link

ThatOtherPerson commented Jun 15, 2017

This implements part of the feature request in #436. It adds a slightly friendlier error message that appears when a value without an attribute in a record. For example, this code

  twenty = [-20]
  [#ui/text text: twenty]

will generate the error message "-20" needs to be labeled with an attribute.

After this, the attribute rule could be modified to take another argument specifying whether the record that is being parsed is part of a functionRecord. If so, the message could mention that function syntax requires arguments to be labeled, and include parameter names if it is a standard library function. I can work on that next, if this looks good to you.

Copy link

joshuafcole left a comment

Thanks for the help, looks great!

@joshuafcole joshuafcole self-assigned this Jun 16, 2017
@joshuafcole joshuafcole merged commit 739de60 into witheve:master Jun 16, 2017
@ThatOtherPerson ThatOtherPerson deleted the ThatOtherPerson:feature/value-missing-attribute-error branch Jun 16, 2017
Copy link

christopherdumas commented Aug 29, 2017

I'm working on the other part of this, but how do I test it out? Is there a way to get the eve-starter to run my modified code?

Copy link

joshuafcole commented Aug 29, 2017

Hey @christopherdumas,
You should be able to build eve from source code by running npm install && npm run build within the eve repository assuming you have a relatively recent version of NodeJS and NPM installed.

You can then start this locally build version using npm start.

Copy link

christopherdumas commented Aug 29, 2017

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.