PDA

View Full Version : How to enable syntax highlighting for my new commands?



D.J.Peters
19-03-2010, 14:52
i got my first TB Modul working all works fine
but inside thinAir the new commands and const's are not highlighted in blue
what i'm doing wrong ?

Joshy

Michael Clease
19-03-2010, 15:45
Locate the syntax folder in your TB install folder i.e. "C:\thinBasic\thinAir\Syntax"

edit the "thinBasic_Keywords_Usr.ini" with the names you want, look at "thinBasic_Keywords.ini" for help.

When the module becomes official Eros can add it to the "thinBasic_Keywords.ini" file.

Mike

D.J.Peters
19-03-2010, 22:14
hello mike
first i was thinking LoadLocalSymbols would do the job.

thank you

Joshy

Michael Hartlef
20-03-2010, 11:30
Hi Joshi,

you can also change the thinBasic.CreateSyntaxIni script located inside the thinAir/SYntax folder. Add your module there, run the script and restart thinair. Of course, when you reinstall thinbasic, this mod is gone.

Michael Clease
20-03-2010, 12:09
hello mike
first i was thinking LoadLocalSymbols would do the job.

thank you

Joshy


I think your confusing interpreter with editor :lol:

D.J.Peters
20-03-2010, 13:23
I think your confusing interpreter with editor :lol:not realy i wrote all 15 plugins for Basic4GL
a IDE can work with an interpreter hand in hand (this is clever and simple)

if an interpreter or compiler parsed a module he knows all new keywords and const
so it's simple to update any syntax files.

Joshy

Michael Clease
21-03-2010, 00:23
So what your suggesting is if I write some code and it has a module included thinAir should then go off and find all the keywords and add them.



USES "ITS","SO","EASY","BUT","SOMEWHAT","OTIOSE"

would result in thinAir scanning each dll and adding any keywords, is that as you type or after a special button press¿

Perhaps you should suggest that to Eros or because you've written all 15 plugins for BASIC4GL you should be rewriting thinAir.

Mike

D.J.Peters
21-03-2010, 00:44
if you call the interpreter manualy (without thinAir) it will only interpret your script.

but if thinAir call's the interpreter it can tell the interpreter "please update all new keyword"

thinBasic.exe best_script_ever.tbasic -refresh_keywords

the line USES "MyModule" would then create

drive:\thinBasic\thinAir\Syntax\MyModule.ini

simple and sexy :-)

Joshy

edit:

cool i found

APP_ListKeywords
APP_ListEquates

Michael Clease
21-03-2010, 01:43
I see what you are saying but if I open a script to edit and add a new module it wont do the highlighting until I execute the script from what your saying but no reason if the editor sees a new module added removed it cant go off and find the information.

thinAir is in the process of being rewritten Eros has taken control of it so if its a feature you want then I would suggest that you suggest it.

Mike