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

Conversation

cassiebeckley
Copy link
Contributor

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

search
  twenty = [-20]
bind
  [#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
Contributor

@joshuafcole joshuafcole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@cassiebeckley cassiebeckley deleted the feature/value-missing-attribute-error branch June 16, 2017 18:39
@alexispurslane
Copy link

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?

@joshuafcole
Copy link
Contributor

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.

@alexispurslane
Copy link

alexispurslane commented Aug 29, 2017 via email

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

Successfully merging this pull request may close these issues.

3 participants