#include <sstream>
using namespace std;
class A {
public:
int get(){ return 1; }
};
int main(){
stringstream str;
str << "id := test;";
str << R"(lala := \"123 \"";)";
A a;
a.get(); // code completition doesn't work here
}
In example when I type "a." and waiting for available fields and methods list of A class - code completition doesn't work. Bug always appears with user-defined types, but for some classes from stl may work (in example completition works for variable "str").
IDE version (installed from ppa):
Code::Blocks Release 16.01 rev 10760 Feb 2 2016, 03:15:41 - wx2.8.12 (Linux, unicode) - 64 bit
Some reference about raw strings:
c++ - What is the rationale for parenthesis in C++11's raw string literals R"(...)"? - Stack Overflow and string literal - cppreference.com
Currently, our Tokenizer class should be enhanced.
Right now, we only handle "xxxx" like string, and in the high level class(the parser), we get a token from the Tokenizer class. But the token is just a wxString, and we now check if the
To see whether this is a string or other type of the tokens. The method to solve this issue is:
First, let the Tokenizer return a structure, such as
Then, we can use the "type" to distingush the tokens types(whether it is a string, an identifier....). This is not quite easy, because we need to change a lot of code in our CodeCompletion plugins.