Odin is a general-purpose programming language with distinct typing,
built for high performance, modern systems, and built-in data-oriented
data types. The Odin Programming Language, the C alternative for
the joy of programming. The Data-Oriented Language for Sane Software
Development.
https://odin-lang.org/https://odin-lang.org/docs/overview/https://github.com/odin-lang/Odin
* Raku syntax: Fix strings and comments
Problematic code:
my @array1 = [
"'", "a", "b"
];
my @array2 = [
'"', 'a', 'b'
];
my @array3 = [
"#", "a", "b"
];
I deleted "default" because it was breaking comments with urls after
of my changes.
Some parts were taken from:
https://github.com/hankache/raku.nanorc/blob/master/raku.nanorc
* Raku syntax: fix strings
Code:
sub xyz(Str is encoded('utf8')) returns int32 is native('asdf') { * }
sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * }
From python3.yaml
* Python syntax: multiline string should be comment.string, not comment
''' delimits multiline strings, not comments
* Python syntax: multiline string should be comment.string, not comment
''' delimits multiline strings, not comments
* Update python3.yaml for python3.10 keywords
Improvements:
- Use proper scope names for better colorization
- Better regex to detect binary, octal, decimal and hexadecimal numbers
- Extend some definitions based on the Vlang docs
Co-authored-by: AAAA <dev@onerbs.com>
Make the regular expression much more precise:
* match literal dots instead of any char (match rc.conf but not rcXconf)
* match special filenames exactly (match PKGBUILD but not myPKGBUILD.something)
Run build-all to update internal/config/runtime.go
closes#2163
Highlight character literals started with a single quote (').
Importantly this ensures correct highlighting for the character literal '"'.
Limitation: rust char literals contain exactly one character, however this isn't checked by the highlighter.
Closes#2160
* Added highlighting for user-defined types
Provides automatic highlighting of user-defined types ending with either "_t" or "_T", as is seen in editors such as Nano, or within GitHub itself.
* Update cpp.yaml
Don't highlight things that don't exist, add some missing keywords,
highlight true/false/nil as constants instead of keywords, and
highlight types as types instead of constants.
- move type cast keywords into operators, since that's their syntactic function
- fix a single dot being matched as a constant.number
- add the missing caret operator
* Overall syntax highlighting improvements for C++
Most of these changes are based on the information on cppreference.com;
specifically from here: https://en.cppreference.com/w/cpp/keyword
- made `identifier` actually match any identifier
- add ~ as an operator
- add `static_assert` as a keyword (statement)
- add keywords that are interchangeable with operators as operators
- add keywords `sizeof`, `alignof` and `typeid` as operators
- add the quasi-keywords `asm`, `fortran` and `final`, `override`
- add the keyword `nullptr`
- add `_Pragma` as a preprocessor keyword
- add C++20 (concepts and modules) -related keywords
- add casting keywords
- add the keyword (specifier) `noexcept`
- remove `nothrow` (because it's not any more special than `vector` is)
- add `wchar_t` and `charXX_t` types
- add cv type keywords as `type.keyword`s
- move some fitting keywords into `type.keywords`
(mostly because they appear in/near type signatures etc.)
I didn't include coroutine-related language features,
primarily because there is no good source of information
about them other than the ISO C++ standard.
* Further changes to C++ syntax highlighting
- reverted the changes to the `identifier` regex, since most
colorschemes color it the same as `type`s and/or `statement`s
- fix the 2nd `type` regex (the word boundaries were in only two pipe-options)
- move `nullptr` back into `constant.bool`,
since it looks better in-editor this way (imo)
- add `?` as an operator
- add regexes that match all the correct number literals, and nothing else
(see https://en.cppreference.com/w/cpp/language/floating_literal)
(that is, if I haven't made a mistake)
* Python3: Add built-in object 'cls'
* Python3: Add the bitwise negation operator ~
* Python3: Add support for hexadeximal and binary numerical literals
* Python3: Rewrite '(__foo__|__bar__)' as '__(foo|bar)__', add known '__i.*__' methods
* Python3: Add __iter__ as a magic method, sort the list of magic methods
* Python3: Numerical literals: Add support for '_', disallow leading 0 for decimals
* fixup! Python3: Numerical literals: Add support for '_', disallow leading 0 for decimals
hex oct and bin have different sets of allowed digits
* Python3: Add support for floating point numbers with optional scientific notation
* Python3: stop single-line strings at EOL
* Python3: Add support for TODO and FIXME in comments
* Python3: Add support for the ^ bitwise xor operator