MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / IsOperator

Function IsOperator

scintilla/lexers/LexModula.cxx:59–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static inline unsigned IsOperator( StyleContext & sc, WordList & op ) {
60 int i;
61 char s[3];
62
63 s[0] = sc.ch;
64 s[1] = sc.chNext;
65 s[2] = 0;
66 for( i = 0; i < op.Length(); i++ ) {
67 if( ( strlen( op.WordAt(i) ) == 2 ) &&
68 ( s[0] == op.WordAt(i)[0] && s[1] == op.WordAt(i)[1] ) ) {
69 return 2;
70 }
71 }
72 s[1] = 0;
73 for( i = 0; i < op.Length(); i++ ) {
74 if( ( strlen( op.WordAt(i) ) == 1 ) &&
75 ( s[0] == op.WordAt(i)[0] ) ) {
76 return 1;
77 }
78 }
79 return 0;
80}
81
82static inline bool IsEOL( Accessor &styler, unsigned curPos ) {
83 unsigned ch = styler.SafeGetCharAt( curPos );

Callers 1

ColouriseModulaDocFunction · 0.70

Calls 2

WordAtMethod · 0.80
LengthMethod · 0.45

Tested by

no test coverage detected