2021-02-21 04:53:09 +00:00
|
|
|
// A demonstration program
|
|
|
|
#include <stdio.h>
|
|
|
|
#if 0 /* */
|
|
|
|
#define DUMMY() \
|
|
|
|
if (1);
|
|
|
|
#endif
|
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
// Test preprocessor expressions with parentheses
|
|
|
|
#if ((0))
|
|
|
|
a
|
|
|
|
#elif ((1))
|
|
|
|
b
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** @file LexCPP.cxx
|
|
|
|
<file>
|
|
|
|
<file >filename</file>
|
|
|
|
LexCPP.cxx.
|
|
|
|
</file>
|
|
|
|
**/
|
|
|
|
|
|
|
|
/** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR:
|
|
|
|
@wrong LexCPP.cxx
|
|
|
|
<wrong>filename</wrong>
|
|
|
|
**/
|
|
|
|
|
2021-02-21 04:53:09 +00:00
|
|
|
#define M\
|
|
|
|
|
|
|
|
\
|
|
|
|
|
Update to scintilla 5.5.0 & Lexilla 5.3.2
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip)
Released 23 April 2024.
Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417.
On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.
Fix Win32 IME crash in windowed mode. Bug #2433.
Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321.
Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip)
Released 23 April 2024.
COBOL: Stop string literal continuing over line end. Issue #229.
COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229.
COBOL: Recognize keywords that start with 'V'. Issue #230.
COBOL: Recognize comments after tag or that start with '/'. Issue #231.
HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.
HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag".
HTML: Match standard handling of comments. Issue #232.
Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.
Ruby: Allow non-ASCII here-doc delimiters. Issue #234.
Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236.
Rust: Recognize raw identifiers. Issue #239, Pull request #240.
Close #15042
2024-04-24 16:45:59 +00:00
|
|
|
|
|
|
|
// Test preprocessor active branches feature
|
|
|
|
|
|
|
|
#if HAVE_COLOUR
|
|
|
|
// Active
|
|
|
|
#endif
|
|
|
|
#if NOT_HAVE_COLOUR
|
|
|
|
// Inactive
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if FEATURE==2
|
|
|
|
// Active
|
|
|
|
#endif
|
|
|
|
#if FEATURE==3
|
|
|
|
// Inactive
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if VERSION(1,2)==3
|
|
|
|
// Active
|
|
|
|
#endif
|
|
|
|
#if VERSION(1,2)==4
|
|
|
|
// Inactive
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef HAVE_COLOUR
|
|
|
|
#if HAVE_COLOUR
|
|
|
|
// Inactive
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MULTIPLY(a,b) a*b
|
|
|
|
#if MULTIPLY(2,3)==6
|
|
|
|
// Active
|
|
|
|
#endif
|
|
|
|
|
2021-02-21 04:53:09 +00:00
|
|
|
int main() {
|
|
|
|
double x[] = {3.14159,6.02e23,1.6e-19,1.0+1};
|
|
|
|
int y[] = {75,0113,0x4b};
|
|
|
|
printf("hello world %d %g\n", y[0], x[0]);
|
|
|
|
|
|
|
|
// JavaScript regular expression (14) tests
|
|
|
|
let a = /a/;
|
|
|
|
let b = /[a-z]+/gi;
|
|
|
|
|
|
|
|
// Escape sequence (27) tests
|
|
|
|
printf("\'\"\?\\\a\b\f\n\r\t\v \P");
|
|
|
|
printf("\0a \013a \019");
|
|
|
|
printf("\x013ac \xdz");
|
|
|
|
printf("\ua34df \uz");
|
|
|
|
printf("\Ua34df7833 \Uz");
|
|
|
|
}
|