Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Started my second attempt at redesigning CSyntax
Re: Started my second attempt at redesigning CSyntax [message #48176 is a reply to message #48175] Tue, 30 May 2017 16:12 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
So my problem is that CSyntax is a bit too married to a specific languages. If the C++ highlighter covers 90% of what you need and the C# highlighter covers 90% of what you need and if you could selectively merge the two you would get full coverage, you are fine, but you can't. I tried in the past, but the only solution was to fork CodeEditor. I don't want to do that anymore.

So rather than CSyntax knowing that you are doing C++, CSyntax has no idea that it is C++.

I have broken highlight into multiple options:
class CSyntaxOptions {
public:
	int lang = 0;
	
	bool SlashBlockComments = false;
	bool SlashLineComment = false;
	bool PoundLineComment = false;
	bool PoundHexa = false;
	bool DashInId = false;
	bool CapitalizeId = false;
	bool Macros = false;


I'll continue adding options. Using this, you can build your language on the fly: you could highlight a language with capitalized IDs with dashes inside, macros and only pound comments. And you can do this without touching CodeEditor.

But I have on important question:
What is HIGHLIGHT_CALC? The only reason I have "lang" in the structure is to handle HIGHLIGHT_CALC. I don't know what it is, so I can't give it a good name.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Infinite loop in Parser
Next Topic: [FeatureReq] Assist++ does not show local variables
Goto Forum:
  


Current Time: Mon Apr 29 04:46:16 CEST 2024

Total time taken to generate the page: 0.09716 seconds