witheve / Eve

Better tools for thought
http://witheve.com
Apache License 2.0
7.16k stars 257 forks source link

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

Closed cassiebeckley closed 7 years ago

cassiebeckley commented 7 years ago

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.

alexispurslane commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Awesome, thanks. On Mon, Aug 28, 2017 at 5:41 PM Joshua Cole notifications@github.com wrote:

Hey @christopherdumas https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/witheve/Eve/pull/845#issuecomment-325521299, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1Ml1602Nn5rvB2-wJ5XDJVv45ww_v0ks5sc14dgaJpZM4N69qZ .

-- Regards, Christopher