Re: Leo and Parallax Propeller spin.

71 views
Skip to first unread message

Terry Brown

unread,
Aug 2, 2012, 12:26:34 PM8/2/12
to leo-e...@googlegroups.com
On Thu, 2 Aug 2012 01:32:23 -0700 (PDT)
Damir Hakimov <damir....@gmail.com> wrote:

> Hello All!
> I want to use Leo for programming on Parallax Propeller SPIN language.
> Language description is available here in PDF format:
> http://www.parallax.com/ProductInfo/Microcontrollers/PropellerGeneralInformation/PropellerMediaPage/tabid/832/Default.aspx
>
> How can I add language to LEO's editor?

There are two parts to that - syntax color highlighting and reading the
language into an outline structure in a way that makes sense. Which
parts are you interested in?

Cheers -Terry

Edward K. Ream

unread,
Aug 2, 2012, 12:28:50 PM8/2/12
to leo-e...@googlegroups.com
On Thu, Aug 2, 2012 at 3:32 AM, Damir Hakimov

> I want to use Leo for programming on Parallax Propeller SPIN language.

There are two parts to supporting a language:

1. Specify the language name, extension and comment delimiters.

This allows you to use @file nodes to manage your spin files.

To do this, add entries to the following node in leoPy.leo:

Code-->Core classes-->@file leoApp.py-->class LeoApp-->app.__init__

2. Tell Leo how to colorize your language.

To do this, you must create a leo/modes/spin.py file.

For instructions about doing this, see this chapter of Leo's documentation:

http://webpages.charter.net/edreamleo/coloring.html

Edward

Edward K. Ream

unread,
Aug 2, 2012, 12:38:54 PM8/2/12
to leo-e...@googlegroups.com
On Thursday, August 2, 2012 11:28:50 AM UTC-5, Edward K. Ream wrote:

2. Tell Leo how to colorize your language.

I forgot to say that this step is completely optional.

EKR

Damir Hakimov

unread,
Aug 3, 2012, 7:56:13 AM8/3/12
to leo-e...@googlegroups.com, terry_...@yahoo.com

There are two parts to that - syntax color highlighting and reading the
language into an outline structure in a way that makes sense.  Which
parts are you interested in?


Syntax color highlighting will be enough.

Damir Hakimov

unread,
Aug 3, 2012, 8:05:16 AM8/3/12
to leo-e...@googlegroups.com
>> To do this, add entries to the following node in leoPy.leo
leoPy.leo can be found in source distributions only?

Edward K. Ream

unread,
Aug 3, 2012, 11:43:26 AM8/3/12
to leo-e...@googlegroups.com
On Fri, Aug 3, 2012 at 7:05 AM, Damir Hakimov <damir....@gmail.com> wrote:
>>> To do this, add entries to the following node in leoPy.leo
> leoPy.leo can be found in source distributions only?

The phrase "leoPy.leo" is actually an abbreviation. See:
http://webpages.charter.net/edreamleo/FAQ.html#how-should-i-use-leo-with-bzr-git-hg-svn-cvs

So you make a local copy of LeoPyRef.leo called leoPy.leo.

Edward
Reply all
Reply to author
Forward
0 new messages