Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: adding line hints when building blocks

From: brett:codeconscious at: 25-May-2002 11:03

Hi Gregg,
>From memory I think the only way to add a line hint is by loading a string. >> block-with-line-hint: load {[^/]}
== [ ] You can insert this block into another.
>> test-block: copy []
== []
>> insert/only test-block block-with-line-hint
== []
>> test-block
== [[ ]] But as far as I can tell as soon as this block is evaluated - it loses it's hint. I think the only feasible alternative is to form a string with the line hint and indentation you need. And I'd really like a pretty formatter for scripts too. Clean script is good but I don't want to have to add line breaks at beginings of blocks. If I remember, Joel created style-x something that mangled comments, but might be enough for just data blocks. Brett.