| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* replaces `restrict` with `__restrict` in C++
`restrict` isn't a C++ keyword, but `__restrict` is recognised by Clang,
GCC, and MSVC as a language extension.
* adds `_BitInt` and `__int128` as C and C++ types
* `_BitInt` is a new C type and an extended integral type for C++.
* `__int128` is an extended integral type on both Clang and GCC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations (#2208)
Something like
id id2("){ ... }");
is no longer wrongly recognized as a "function"
id id2(") {
...
}
");
As the difference in the tests shows, this has the unfortunate side
effect that we no longer highlight something like
int f(param="default");
as a function declaration, but it is hard to imagine another way to
fix this (cf. “most vexing parse” problem).
Fixes #2207
|
|
|
| |
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Lex identifiers after `case` as constants
Add a state for marking identifiers preceded by a `case` keyword as
constants.
Additionally, refactor the `label` rule to no longer permit a `case`
keyword before a label.
Consequentially, identifiers after a `case` keyword (like `foo` in
`case foo:`) are no longer wrongly lexed as `Name.Label`, but as
`Name.Constant`.
In addition, this fixes #2076, as multiple `case` keywords in one
line are lexed the same.
* Add test for multiple `case` keywords in one line
* Fix existing tests
* Lex `::` as Operator and not Name.Constant
After a `case`, when lexing a namespaced name, like `foo::bar`, lex the
namespace operator `::` as Operator, and not Name.Constant.
* Regenerate tokens
|
|
|
|
|
| |
* Fix #1237 cpp whitespace token usage expanded
* Adapt tests change to 3eff56f5
|
|
|
|
| |
The CFamilyLexer was matching whitespace as Text instead of Whitespace.
|
|
|
|
|
|
|
|
|
|
|
|
| |
CFamilyLexer failed to tokenize preprocessor macros when they were
preceded by line break surrounded by spaces. This was the case because
prerpocessor regex rule expected to start at the beginning of the line,
but the space regex rule matched also the whitespace after the line
break. Now the space rule has been refined not to match the line break.
Because of this, the preprocessor regex rule correctly matches
prerpocessor tokens even when they are preceded by white spaces, at the
cost of adding some more tokens in the token stream in some cases. This
change preserves the behavior of invalid preprocessor usage failing to
tokenize.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Support for OMG IDL
Lexer for [Object Management Group Interface Definition Language](https://www.omg.org/spec/IDL/About-IDL/).
* Allow Whitespace Before include in C Preprocessor
It wasn't highlighting the included filename the same as if there was no
space before the include, but now it is.
* Update omg-idl Tests to Latest Requirements
* Update omg-idl versionadded to 2.9
Since I just realized this missed the 2.8 release.
* Add Missing Operators to omg-idl
|
| |
|
|
docs to point to both snippets and examplefiles.
|