Comments (7)
This is invalid c++. operator
is a reserved keyword.
from tree-sitter-cpp.
You're right. It doesn't compile. I oversimplified my example when trying to get the minimal reproducible example. My real case is a struct with a member operator
. I know operator
is a reserved keyword, and would not have chosen it for an identifier, but I work in a team. It compiles at work, but right now I can't reproduce it.
from tree-sitter-cpp.
It shouldn't compile if there's a data member just called "operator
" ... seems like a bug with your compiler.
from tree-sitter-cpp.
Yeah.... I can't reproduce it on my personal computer. I guess I'll just rename the member. Thanks.
from tree-sitter-cpp.
My mistake. It's a call to operator=
.
from tree-sitter-cpp.
Is it possible to reopen this? I'm sorry for my earlier confusion but I think there is really a parsing error here.
from tree-sitter-cpp.
I think this is a general issue with explicitly calling any operator overload. Same problem with this->operator++(1)
or foo.operator*()
etc. I'll reopen and edit the title.
from tree-sitter-cpp.
Related Issues (20)
- bug: Fail to parse cpp-reference example
- bug:
- bug: raw string literal eats translation unit under certain error scenarios HOT 1
- bug: virtual class parents require access specifier when they ought to be optional
- bug: `[[depracated]]` with reason-string on namespace declaration not supported HOT 2
- bug: No highlight with `#define`d 'extern "C" {' HOT 1
- feature: Python Bindings HOT 1
- bug: pure virtual destructor declaration HOT 2
- bug: HOT 1
- bug: 0.21.0: missing symbol static_assert HOT 2
- bug: Tree sitter does not recognize Clang's Nullability Attributes
- bug: `__asm` not recognized as `gnu_asm_expression`
- bug: `asm` with `raw_string_literal` produces `ERROR` rather than `gnu_asm_expression`.
- bug: `constexpr friend` member function produces `ERROR` node.
- bug: Treesitter does not recognize a template function that is a member of an instance of a class, where the type is specified when calling
- bug: specific class definition pattern produces ERROR nodes
- feature: Parse IDAPro Export Pseudocode HOT 2
- bug: [BUG]When parsing template functions that contain function pointers, parsing will fail. HOT 1
- bug: operator < is parsed as begnning of template argument list. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tree-sitter-cpp.