Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Q: Extending it to be usable as a lexer template #69

Open
Ekopalypse opened this issue May 20, 2021 · 4 comments
Open

Q: Extending it to be usable as a lexer template #69

Ekopalypse opened this issue May 20, 2021 · 4 comments

Comments

@Ekopalypse
Copy link

I am currently trying to add a lexer class to the plugin pack so that it can be used to write lexers in C#.
The additional exports needed have been added in UnmanagedExports.cs.
The problem I face is that the methods in the ILexer class are garbage collected.
But from what I have read, static classes or static members of a class should not be garbage collected.
Any idea? Sorry, I am very new to C#.
Btw. My current declaration of the class is different from what is available on github and looks like this.

internal static class ILexer
@omid99visual
Copy link

What is it ILexer?

@Ekopalypse
Copy link
Author

A wrapper to the C++ Interface provided by scintilla.

@mahee96
Copy link
Collaborator

mahee96 commented May 23, 2021

@Ekopalypse is it newly added to scintilla interface definitions, if so the ILexer class doesn't need to be added manually, instead there is a generator script which updates the C# file, that needs to be run.

We can re-run the generator to update C# scintilla interface. Please let us know.

@Ekopalypse
Copy link
Author

Ekopalypse commented May 23, 2021

@mahee96
No, it is not new, I assume the ILexer interface is about as old as scintilla itself.
I assume you are talking about the scintilla.iface file, which is used to describe the scintilla interface.
If that is the case, then no, ILexer is not defined there, it is defined in ILexer.h. The only reference
in scintilla.iface is the call SetILexer which would be used to set an external lexer.
As far as I can see, the ILexer interface is not wrapped by the PluginPack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants