C#, Inno Script, Autohotkey lexers

All questions regarding lexer highlighting schemes are discussed here...
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Is it possible that built-in functions (the names with the "()" in the above list) and some operators do not be recognized?
https://i.imgur.com/k2QipZp.png
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

you use color theme (syntax theme) which highlites them as white, so just change the theme.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

do you suggest to highlite operators not/or/and/xor? You missed them in the lists above.
missed here too- https://www.autohotkey.com/docs/KeyList.htm
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

I have tested the AHK lexer after your "Updated AHK lexer (in Cud and SynWrite), fixed all your notes, pls test." comment. So that's why the functions are not highlighted. I'm downloading now the newest one.

Yes, there is a GetKeyState statement (which is deprecated) and a GetKeyState() function. https://www.autohotkey.com/docs/command ... yState.htm

The logical operators (not, or, and, ...) are in the bottom of the first list.

As for the key names: in the statement msgbox Return from the space. both the return and space will be highlighted, but after the msgbox there is a only a string (same as msgbox % "Return from the space."). I will post regarding this behaviour (there are statement options, registry keys, ...).

Thanks!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Made more fixes, now all this is highlited OK

Code: Select all

GetKeyState
GetKeyState (dd)
FileExist
FileExist()
new not or and
++ -- **
~ ^ | & << >>
- + * / //
! not || or && and
~= = == <> != < > <= >=
:= += -= *= /= //= .= ^= |= &= <<= >>=
msgbox Return from the space.
Will update lexer in 10min.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Thank you for your efforts!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Updated AHK lexer, fixed rules for backtick, for labels, for msgbox strings.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

C# bits and pieces:

Code: Select all

// the _ as digits separator
int x = 123_456;
// the E/e exponential symbol
double n = 1E06;
// binary literal "0b" prefix
int b = 0b11001;

// M D F suffixes (case-insensitive) 
decimal d = 1000m;
double dd = 100d;
float si = 10f;

string sv = @"verbatim string";
// colour/style of $
string si = $"interpolated string";
// $ must precede @ in this case
string sb = $@"both";

// expression-bodied property, the "=>" operator
int some_func (int x) => x * 2;
https://i.imgur.com/b1ee20L.png
Thanks!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Good reports, will fix them.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Updated C# lexer, fixed all, pls test.
Post Reply