Fixed AST for operator:: after template (#6195)
This commit is contained in:
parent
55b14853d0
commit
58fe668fc4
|
@ -557,7 +557,7 @@ static void compileScope(Token *&tok, AST_state& state)
|
||||||
if (tok)
|
if (tok)
|
||||||
compileTerm(tok, state);
|
compileTerm(tok, state);
|
||||||
|
|
||||||
if (binop->previous() && binop->previous()->isName())
|
if (binop->previous() && (binop->previous()->isName() || (binop->previous()->link() && binop->strAt(-1) == ">")))
|
||||||
compileBinOp(binop, state, nullptr);
|
compileBinOp(binop, state, nullptr);
|
||||||
else
|
else
|
||||||
compileUnaryOp(binop, state, nullptr);
|
compileUnaryOp(binop, state, nullptr);
|
||||||
|
|
|
@ -8421,6 +8421,9 @@ private:
|
||||||
ASSERT_EQUALS("name_bytes[bits~unusedBits>>unusedBits<<{=", testAst("const uint8_t name_bytes[] = { (~bits >> unusedBits) << unusedBits };"));
|
ASSERT_EQUALS("name_bytes[bits~unusedBits>>unusedBits<<{=", testAst("const uint8_t name_bytes[] = { (~bits >> unusedBits) << unusedBits };"));
|
||||||
ASSERT_EQUALS("abuf0{={=", testAst("a = { .buf = { 0 } };"));
|
ASSERT_EQUALS("abuf0{={=", testAst("a = { .buf = { 0 } };"));
|
||||||
ASSERT_EQUALS("tset{=", testAst("struct cgroup_taskset tset = {};"));
|
ASSERT_EQUALS("tset{=", testAst("struct cgroup_taskset tset = {};"));
|
||||||
|
|
||||||
|
// template paratheses: <>
|
||||||
|
ASSERT_EQUALS("stdfabs::m_similarity(numeric_limitsepsilon::(<=return", testAst("return std::fabs(m_similarity) <= numeric_limits<double>::epsilon();")); // #6195
|
||||||
}
|
}
|
||||||
|
|
||||||
void astbrackets() const { // []
|
void astbrackets() const { // []
|
||||||
|
|
Loading…
Reference in New Issue