Re: Cannot load a lexer
Roger Tunnicliffe <[email protected]> Wed, 17 Dec 2025 04:03:32 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_29836_1317435385.1765973012573 Content-Type: multipart/alternative; boundary="----=_Part_29837_1726074040.1765973012573" ------=_Part_29837_1726074040.1765973012573 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It's just a null terminated string (a C string) -> 4 bytes D,i,m,0x0 and=20 scintilla_send_message(sci, SCI_SETKEYWORDS, 1, strptr(one_keyword)) and strptr (one_keyword) is the address of that string because FreeBasic=20 holds a descriptor for the string (strptr is used to pass the string NOT=20 the descriptor) Your saying to the Lexer that DIM is the only keyword (sadly it is never=20 highlighted) Cheers Roger On Wednesday, December 17, 2025 at 1:00:02=E2=80=AFPM UTC+11 Neil wrote: > Roger Tunnicliffe: > > > dim one_keyword as string =3D "dim" & &h00 > > I'm not familiar with FreeBasic and have no idea what the above line > does, particularly '& &h00'. > > > If this is to replace keywords it tells us that they already exist so I= =20 > am not sure why I would have to add any.. > > You need to replace an initially empty list "" with a non-empty list "x y= =20 > z". > > Neil > --=20 You received this message because you are subscribed to the Google Groups "= scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-i= nterest/85f011bf-8bf6-4dd9-8cbe-ff57b9adc011n%40googlegroups.com. ------=_Part_29837_1726074040.1765973012573 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It's just a null terminated string (a C string) -> 4 bytes D,i,m,0x0<br = />and=C2=A0<div><span style=3D"font-family: "Droid Sans Mono", &q= uot;monospace", monospace; font-size: 13px; white-space: pre; backgrou= nd-color: rgb(31, 31, 31); color: rgb(220, 220, 170);">scintilla_send_messa= ge</span><span style=3D"color: rgb(204, 204, 204); font-family: "Droid= Sans Mono", "monospace", monospace; font-size: 13px; white-= space: pre; background-color: rgb(31, 31, 31);">(</span><span style=3D"font= -family: "Droid Sans Mono", "monospace", monospace; fon= t-size: 13px; white-space: pre; background-color: rgb(31, 31, 31); color: r= gb(156, 220, 254);">sci</span><span style=3D"color: rgb(204, 204, 204); fon= t-family: "Droid Sans Mono", "monospace", monospace; fo= nt-size: 13px; white-space: pre; background-color: rgb(31, 31, 31);">,</spa= n><span style=3D"font-family: "Droid Sans Mono", "monospace&= quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(= 31, 31, 31); color: rgb(156, 220, 254);"> SCI_SETKEYWORDS</span><span style= =3D"color: rgb(204, 204, 204); font-family: "Droid Sans Mono", &q= uot;monospace", monospace; font-size: 13px; white-space: pre; backgrou= nd-color: rgb(31, 31, 31);">, </span><span style=3D"font-family: "Droi= d Sans Mono", "monospace", monospace; font-size: 13px; white= -space: pre; background-color: rgb(31, 31, 31); color: rgb(181, 206, 168);"= >1</span><span style=3D"color: rgb(204, 204, 204); font-family: "Droid= Sans Mono", "monospace", monospace; font-size: 13px; white-= space: pre; background-color: rgb(31, 31, 31);">, </span><span style=3D"fon= t-family: "Droid Sans Mono", "monospace", monospace; fo= nt-size: 13px; white-space: pre; background-color: rgb(31, 31, 31); color: = rgb(220, 220, 170);">strptr</span><span style=3D"color: rgb(204, 204, 204);= font-family: "Droid Sans Mono", "monospace", monospace= ; font-size: 13px; white-space: pre; background-color: rgb(31, 31, 31);">(<= /span><span style=3D"font-family: "Droid Sans Mono", "monosp= ace", monospace; font-size: 13px; white-space: pre; background-color: = rgb(31, 31, 31); color: rgb(156, 220, 254);">one_keyword</span><span style= =3D"color: rgb(204, 204, 204); font-family: "Droid Sans Mono", &q= uot;monospace", monospace; font-size: 13px; white-space: pre; backgrou= nd-color: rgb(31, 31, 31);">))</span></div><div><br /></div><div>and strptr= (one_keyword) is the address of that string because FreeBasic holds a desc= riptor for the string (strptr is used to pass the string NOT the descriptor= )</div><div><br /></div><div>Your saying to the Lexer that DIM is the only = keyword (sadly it is never highlighted)</div><div><br /></div><div>Cheers</= div><div>Roger</div><div><br /></div><div><br /></div><div class=3D"gmail_q= uote"><div dir=3D"auto" class=3D"gmail_attr">On Wednesday, December 17, 202= 5 at 1:00:02=E2=80=AFPM UTC+11 Neil wrote:<br/></div><blockquote class=3D"g= mail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 2= 04, 204); padding-left: 1ex;">Roger Tunnicliffe: <br> <br>> dim one_keyword as string =3D "dim" & &h00 <br> <br>I'm not familiar with FreeBasic and have no idea what the above lin= e <br>does, particularly '& &h00'. <br> <br>> If this is to replace keywords it tells us that they already exist= so I am not sure why I would have to add any.. <br> <br>You need to replace an initially empty list "" with a non-emp= ty list "x y z". <br> <br>Neil <br></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;scintilla-interest" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= scintilla-interest/85f011bf-8bf6-4dd9-8cbe-ff57b9adc011n%40googlegroups.com= ?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/= scintilla-interest/85f011bf-8bf6-4dd9-8cbe-ff57b9adc011n%40googlegroups.com= </a>.<br /> ------=_Part_29837_1726074040.1765973012573-- ------=_Part_29836_1317435385.1765973012573--