[Gambas-user] Scripter new version Bug

Brian G brian at westwoodsvcs.com
Mon Mar 8 04:15:21 CET 2021


The change log does metion for forms and modules for simple scripts. It was basically implemented to make it easy to generate an number of test scripts form projects.
And it is not tested deeply for that support, but they are there for now.
I am not sure of all the gambas source types. 
--
Thanks
Brian Sunday, 07 March 2021, 11:03AM -08:00 from Benoît Minisini  g4mba5 at gmail.com :

>Le 07/03/2021 à 18:01, Brian G a écrit :
> Scripter  option --convert-project creates an error right now as  it 
> uses the new #Script Startup=xx format.
> when you run the generated script it will cause a syntax error.
>
> The latest version of scripter now fails because #Script has been turned 
> into a keyword PreProcess command after the initial commit of the 
> scripter causing scripter not to recognize the keyword, A patch that 
> fixes scripter to accommodate this has been submitted for merge.
>
> In the mean time for simple scripts, deleting this line from the output 
> script should work a treat.
> Lines starting with #Script can be deleted for now.
>
> "Failure is the key to success;
>  each mistake teaches us something"  .. Morihei Ueshiba
> Brian G
>
>
>Hi,
>
>The merge request has been merged
>
>A few remarks:
>
>1) I now realize the misunderstanding about Highlight.Analyze() and 
>Highlight.Types.
>
>If an analyzed token is told to be 'Highlight.XXXX', it does not mean 
>that the token is syntactically 'XXXX', but that it will be highlighted 
>as 'XXXX'.
>
>So if '#SCRIPT' has the type 'Highlight.Preprocessor', it does not 
>-necessarily- mean that you are in a preprocessor line. Even if it is 
>very likely. It just tells you that the Gambas reader detected a token 
>named '#SCRIPT' that will be highlighted with 'Highlight.Preprocessor' 
>style.
>
>I don't know if I was clear...
>
>Concretely, what tells you that you have a preprocessor line is the 
>first non-space character of the line being "#".
>
>2) There are possible optimizations in the TokenizeFile() function. For 
>example:
>
>- Storing Highlight.Symbols and Highlight.Types in local variables for 
>faster access.
>
>- Use `If  == "ABCD"` instead of `If UCase( ) = "ABCD"`.
>
>- Check for '#' at the start of the line before doing its specific 
>script commands checks. Or directly check that the first token starts 
>with a '#'.
>
>3) When you write a commit log, please follow exactly the requested 
>format described in the 'README.commit' file:
>
>
>
>[SCRIPTER]
>* BUG: Fixed bug #1.
>* NEW: Add feature #2.
>* OPT: Scripter is now faster!
>
>And be careful with English (even if I make a lot of mistakes myself!).
>
>Otherwise the automatic log compilation cannot work, and I have to 
>rewrite the log by hand for each commit. My time is better spent 
>somewhere else.
>
>It's not dramatic at the moment, as a lot of commit log will be removed 
>from the ChangeLog, the ones who are internal changes and not new 
>features or bug fixes of precedently implemented features.
>
>4) By reading the code of TokenizeFile(), I see support for apparently 
>embedding classes (ok), modules (why not), form (??) and connections 
>(????). But nothing for the other Gambas source file types.
>
>I didn't see anything about that in the list of changes you sent me. Did 
>I miss it? Or is it an hidden feature? Something not yet implemented? 
>Otherwise why did you implement that?
>
>Anyway, thanks for your work!
>
>Regards,
>
>-- 
>Benoît Minisini
>
>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210308/94824dfa/attachment-0001.htm>


More information about the User mailing list