Here is a posting which might be helpful: http://sourceforge.net/forum/message.php?msg_id=2300457 The @first directive is the key to output usable code in unsupported languages. For example, to use Leo with the Basic language, use the following:
@first $IFDEF LEOHEADER @delims ' @c $ENDIF
So this would enable a basic compiler to “jump” over the “true” LEO-header-lines. Like this:
$IFDEF LEOHEADER <-conditional compilation directive #@+leo-ver=4 <-these lines not compiled #@+node:@file QParser005.INC #@@first #@delims ' '@@c $ENDIF <-... Until here! <rest of derived code file ... >
This changes the comment symbol the apostrophe, making comments parseable by a BASIC (or other language.)
"""Have discoverd & started using LEO 2 days ago
By: Nobody/Anonymous (nobody) - 2003-11-23 04:44
|
|
I really like the concept, literate prog, and i find it delivers. I have easily made some code with it for some other languages and have found that the "@first" directive is the key to output useable code in unsupported languages. ...as example, for a BASIC language compiler: ->body of a "@file" header: -----------------------------Snippet |
@first $IFDEF LEOHEADER @delims ' @c $ENDIF |
|
-----------------------------End of snippet So this would enable a basic compiler to "jump" over the "true" LEO-header-lines; wich gives you: -----------------------Derived file begins with: $IFDEF LEOHEADER <-conditionnal compilation directive |
#@+leo-ver=4 <-these lines not compiled #@+node:@file QParser005.INC #@@first #@delims ' '@@c $ENDIF <-... Until here! <rest of derived code file ... > |
| -----------------------end of snippet The thing it does is mostly changing the comment symbol to " ' " apostrophe... making comments parseable by a BASIC (or other language.) The thing that I really like is the fact that LEO untangles my code if I change it externally, in an IDE or editor of some kind! hope this helps, if you have any tricks to share for adding compatibility / productivity using LEO, please tell me! -- bolt |
I'd like to add basic language support for erlang (.erl/.hrl) files.