metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
126 stars 27 forks source link

Error in SOURCE UPARSE, SOURCE PARSE #1123

Closed giuliolunati closed 3 years ago

giuliolunati commented 3 years ago

>> source uparse => Script Error: keep requires value argument to not be null Where: _ reeval collect collect spec-of unspaced source console Near: [ select meta 'description types: ensure [ fr... File: -tmp-boot-

Same with source parse

(tested with OS 0.13.2, 92171dcf, nodebug)

hostilefork commented 3 years ago

Bug, and it's a consequence of this, which I know is inconvenient to absorb but I believe it is converging on the right answer:

https://forum.rebol.info/t/every-thought-on-array-splicing-has-been-had/1332/8?u=hostilefork

https://forum.rebol.info/t/the-long-awaited-death-of-only/1607

Sorry there's so much to learn, but I'm trying to get things right! :-)

hostilefork commented 3 years ago

Here's a bit of a fix:

https://github.com/metaeducation/ren-c/commit/3fff2bd17f92c1e1ad47b201b209d7e64e20424b

(Please see also the post where I discuss the NULL vs. BLANK! for APPEND etc.)

Though bear in mind that SOURCE has never really been retooled for ADAPTs, ENCLOSEs, SPECIALIZEs etc. (and there are limits there to what is possible).

So it really is best to go to the place in the source where things are defined. I'd like us to make it easier to get at that information (file/line #) which we actually do have (!)