Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

if define MACRO, c++ Syntax colorization and highlighting is error #152

@sridmad

Description

@sridmad

From @sandy081 on June 16, 2016 8:24

From @shudingbo on June 15, 2016 10:50

  • VSCode Version: 1.2.1,maybe all version
  • OS Version: win,linux

Steps to Reproduce:

  1. no define macro, highlighting OK.
DeskManagerImpl::DeskManagerImpl(){

}

DeskManagerImpl::~DeskManagerImpl(){

}

void DeskManagerImpl::SetDataInterface(){
    printf("%s success \n", __FUNCTION__);
}

void DeskManagerImpl::SetLogInterface(Nan::Persistent<v8::Function> *cbLog,
    Nan::Persistent<v8::Function> *cbLogDebug,
    Nan::Persistent<v8::Function> *cbLogData )
{
    _cbLog = cbLog;
    _cbLogDebug = cbLogDebug;
    _cbLogData = cbLogData;     
};
  1. if define macro, following, highlighting colorization all is macro's color
#define V8_GETATTR_INT(obj, name) (obj->Get(Nan::New( name ).ToLocalChecked()).As<v8::Integer>()->Value())
#define V8_GETATTR_STR(obj, name) (*Nan::Utf8String(obj->Get(Nan::New( name ).ToLocalChecked()).As<v8::String>()))

#define V8_ToString(obj,name,type) (*Nan::Utf8String( obj->Get(Nan::New( name ).ToLocalChecked()).As<type>()->ToString()))

//// The following, highlighting colorization all is macro's color
DeskManagerImpl::DeskManagerImpl(){

}

DeskManagerImpl::~DeskManagerImpl(){

}

void DeskManagerImpl::SetDataInterface(){
    printf("%s success \n", __FUNCTION__);
}

void DeskManagerImpl::SetLogInterface(Nan::Persistent<v8::Function> *cbLog,
    Nan::Persistent<v8::Function> *cbLogDebug,
    Nan::Persistent<v8::Function> *cbLogData )
{
    _cbLog = cbLog;
    _cbLogDebug = cbLogDebug;
    _cbLogData = cbLogData;     
};

Copied from original issue: microsoft/vscode#7714

Copied from original issue: microsoft/vscode-cpptools#74

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions