C++ formatting errors (v0.6?)

Issue #167 resolved
Former user created an issue

The following doesn't highlight well:



int C::x (bool (x) (temp<class X> xx, restrict float yy, size_t zz) { const double data[] = { 0, -0.0, .0, 0f, 0.0f, 1e1, 1.0e1, 1E1, 1e-1, -1e-1, 0x1 }; this->test = static_cast<long long*>(std::test(0.1f, true, NULL)); auto wchar_t ch = g() ? '\n' + '\x01' : 001 + 0x01; return 1e1; } }}}

Notes: * '{' & '}' are NOT keywords. * 'restrict' IS a keyword. * The line of number literals all format differently. (They shouldn't.) * 'C:' & 'std:' should NOT be formatted as separate tokens ('C' & 'std' or 'C::' & 'std::'). * 'NULL' is NOT a keyword. (If there a way to define a list of 'custom' words then 'NULL' could be a 'custom' word.)

Reported by CHRIS

Comments (5)

  1. Anonymous

    I'll agree that the numbers are formatting strangely.

    The `C:` part is actually formatting more wrong than initially reported, as it's formatting `C:` as a label and `:` as an operator.

    `NULL` is being highlighted as a constant... which it kind of is. Constant is named internally as `Keyword.Constant`.

  2. Log in to comment