what is c lexer?

I wonder what is the lexer for c language

python : STC_LEX_PYTHON
fortran : STC_LEX_FORTRAN
c++ : STC_LEX_CPP
c : ?

STC_LEX_CPP will normally give you a close enough result.

Gadget/Steve

···

On 08/10/2011 9:43 AM, Wonjun, Choi wrote:

I wonder what is the lexer for c language

python : STC_LEX_PYTHON
fortran : STC_LEX_FORTRAN
c++ : STC_LEX_CPP
c : ?

ok thank you
btw, I wonder whether this is possible.

if stc.GetCurrentPos() > 1 and stc.GetCurrentPos() < 10:
stc.SetLexer(stc.STC_LEC_CPP)
elif stc.GetCurrentPos() > 10 and stc.GetCurrentPos() < 20:

stc.SetLexer(stc.STC_LEC_PYTHON)
elif stc.GetCurrentPos() > 20 and stc.GetCurrentPos() < 30:
stc.SetLexer(stc.STC_LEC_FORTRAN)
else:
stc.SetLexer(stc.STC_LEC_NULL)

AND when I set the style back, should I write like this?

stc.SetStyleBits(5)
stc.SetLexer(st.STC_LEX_NULL)
stc.ClearDocumentStyle()
stc.UpdateBaseStyles()

···

2011/10/8 Gadget/Steve GadgetSteve@live.co.uk

On 08/10/2011 9:43 AM, Wonjun, Choi wrote:

I wonder what is the lexer for c language

python : STC_LEX_PYTHON

fortran : STC_LEX_FORTRAN

c++ : STC_LEX_CPP

c : ?

STC_LEX_CPP will normally give you a close enough result.

Gadget/Steve

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en