Commit 825bbe7a authored by Victor Yacovlev's avatar Victor Yacovlev

Message fix

parent 3890d5fb
......@@ -311,6 +311,8 @@
"Too many ':=' operators";"Много “:=” в одной строке";"";"";"";"";
"Too many 'not'";"Много “не”";"";"";"";"";
"Too many errors";"Слишком много ошибок";"";"";"";"";
"Too many qoutes";"";"";"";"";"";
"Too many qoutes in constant";"Много кавычек в одной константе";"";"";"";"";
"Type not declared before";"Не указан тип";"";"";"";"";
"Unmatched array dimensions";"Несоответствие размерностей таблиц";"";"";"";"";
"Unpaired '('";"Нет парной “)”";"";"";"";"";
......
......@@ -4086,9 +4086,23 @@ QVariant SyntaxAnalizer::parseConstant(const std::list<LexemPtr> &constant,
maxDim = 0;
ct = testConst(constant, localErr);
if ( ct==AST::TypeNone ) {
QString errorText = _("Not a constant value");
if (constant.size() > 1) {
bool allLiterals = true;
for (std::list<LexemPtr>::const_iterator it = constant.begin(); it!=constant.end(); it++) {
LexemPtr lx = *it;
if (LxConstLiteral != lx->type) {
allLiterals = false;
break;
}
}
if (allLiterals) {
errorText = _("Too many qoutes in constant");
}
}
for (std::list<LexemPtr>::const_iterator it = constant.begin(); it!=constant.end(); it++) {
LexemPtr lx = *it;
lx->error = _("Not a constant value");
lx->error = errorText;
}
return QVariant::Invalid;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment