arthurbacci / Teditor

A simple text/code editor
GNU General Public License v3.0
74 stars 7 forks source link

Improve syntaxes #36

Closed bynect closed 3 years ago

bynect commented 3 years ago

Add more keywords, constant, etc. to create "real life" syntax highlighting.

bynect commented 3 years ago

Don't merge yet, I am working on the c/c++ descriptor now

arthurbacci commented 3 years ago

Wow

bynect commented 3 years ago

Wow

In your opinion is better to divide the C and C++ descriptors or to maintain an unified one? (Differences: class public private protected constexpr restricted etc)

arthurbacci commented 3 years ago

I think a unified one is good. Most of the text editors have a unified one.

bynect commented 3 years ago

I think a unified one is good. Most of the text editors have a unified one.

I looked up for the different keywords and it seems like C++ has a tons more keywords than c. https://en.cppreference.com/w/c/keyword https://en.cppreference.com/w/cpp/keyword

Probably separating is better at this point

arthurbacci commented 3 years ago

In this case, I think it would be good to separate. But there's a problem: .h is used both by C and C++

bynect commented 3 years ago

In this case, I think it would be good to separate. But there's a problem: .h is used both by C and C++

Yea, sometimes even on github my c headers are labelled as c++. What do you think I should do in this case?

bynect commented 3 years ago

For now I have added only C (up to C11) keywords to c_cpp_kwd. Now, should I add C++ keywords too or prepare a different descriptor?

arthurbacci commented 3 years ago

I think it's better to prepare a different one.