improve error when name and parameters are not space-separated#8958
improve error when name and parameters are not space-separated#8958fdncred merged 7 commits intonushell:mainfrom 1Kinoti:def
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8958 +/- ##
==========================================
+ Coverage 68.84% 68.97% +0.12%
==========================================
Files 641 641
Lines 102325 102490 +165
==========================================
+ Hits 70450 70691 +241
+ Misses 31875 31799 -76
|
|
Should we detect this and then just let them not have to put the space if they don't want to? 🤔 |
|
i haven't figure how to do that yet,😅 since i'd probably have to rewrite |
|
@1Kinoti I wonder if we could check how many args were passed in, and if it's one less than what we expect, we look to see if we can convert the |
Does Nushell not use a tokenizer before parsing? I feel like a tokenizer would make this trivial (but i have zero experience with making a REPL or tokenizer, so...) |
@jntrnr where would we check this? in edit: also there's the |
@cmidkiff87 there is a tokenizer |
|
@1Kinoti we can probably land this if you fix the conflicts please. |
Just on the face of it I think you reverted some of my changes. I got this error before I changed the parser correctly. That is the rough idea but I'll check your changes to see where it goes wrong |
pingiun
left a comment
There was a problem hiding this comment.
I believe this is where your error comes from. Externs can now have more than 3 spans
Co-authored-by: Jelle Besseling <jelle@pingiun.com>
|
let's move forward with this. thanks. |
Description
closes #8934
this pr improves the diagnostic emitted when the name and parameters of either
def,def-envorexternare not separated by a spacefrom