Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-11

A newbie question about m_none and m_all modeswitches

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

Hello developers.

I'm trying to gain some understanding of fpc internals, in view of possible contributions, and I stumbled in something I don't understand.

The tmodeswitch type is, as far as I can grasp, an enumerated type used to enable or disable features according compilation switches, such as delphi objfpc, etc.

Some tokens are conditioned by compilation switches, as reflected by the appropriate field in arraytokeninfo while some others are not, and this I understand: some constructs are mac specific, others are delphi specific, etc.

But I fail to grasp the difference between *m_none* and *m_all*.

Could someone shed some light on this subject?

Thank in advance,

Giuliano

Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde)

Reply by email

Jonas Maebe
to Giuliano Colla
Giuliano Colla wrote
But I fail to grasp the difference between *m_none* and *m_all*.

These are used in tokens.pas. Tokens marked as m_all are treated as a keyword in all syntax modes (i.e., you can never use them as identifier without escaping them). Tokens marked as m_none are never treated as a keyword.

Jonas

Reply by email

Giuliano Colla
to Jonas Maebe

Jonas Maebe ha scritto:

Show quoted text 10 lines
On 26 Nov 2009, at 12:44, Giuliano Colla wrote: > But I fail to grasp the difference between *m_none* and *m_all*. These are used in tokens.pas. Tokens marked as m_all are treated as a keyword in all syntax modes (i.e., you can never use them as identifier without escaping them). Tokens marked as m_none are never treated as a keyword.

Thank you, now I understand.

Giuliano

Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde)

Reply by email