[Gambas-user] bug: syntax markers

Benoit Minisini gambas at ...1...
Sun Nov 14 19:31:58 CET 2004


On Sunday 14 November 2004 08:56, Ron Onstenk wrote:
> given the lin under test:
>
>  sLine = Trim(Replace(Replace(sLine,")",""),"Move(",""))
>              1>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>1
>                      2>>>>>>>>>>>>>>>>>>>>2-----------^
>                              3>>>>>>>3----^
>                              4<<<<<<<4 should not do any
>                      5<<<<<<<^<<<<<<<<<<<<5
>                                                  6<<<<6
>
>
> 1 till 6 are the cursor positions,
> The < and > the direction the match is found
> The ^ is the right that should be.
>
> #1 is OK
> #2 is found 1 to early due ")" at position 3
> #3 is found 1 to early in string same reason as #2
> #4 should search backward and in string or do nothing.
> #5 counts one to much back due quoted ")" at position 3
> #6 should also not work because it is inside a string
>    and the close should be in string to as with position 4.
>
> #1 is by accident OK while inner count of ( and ) matches.
>
> For change
>   sLine = Trim(Replace(Replace(sLine,")",""),"Move(",""))
> to
>   sLine = Trim(Replace(Replace(sLine,"]",""),"Move[",""))
> works OK. Not the program anymore :(
>
>   sLine = Trim1(Replace2(Replace3(sLine,"]","")3,"Move[","")2)1
>
> This will be not easy to solve but a note about it should be made
> for this functional behavior.
> It can't be a simple count of ( and ) or need annalize they are
> not in text strings embedded.
>

OK, I fixed it!

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list