Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
825bbe7a
Commit
825bbe7a
authored
Sep 23, 2014
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message fix
parent
3890d5fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
share/kumir2/kumiranalizer/messages.csv
share/kumir2/kumiranalizer/messages.csv
+2
-0
src/plugins/kumiranalizer/syntaxanalizer.cpp
src/plugins/kumiranalizer/syntaxanalizer.cpp
+15
-1
No files found.
share/kumir2/kumiranalizer/messages.csv
View file @
825bbe7a
...
...
@@ -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 '('";"Нет парной “)”";"";"";"";"";
...
...
src/plugins/kumiranalizer/syntaxanalizer.cpp
View file @
825bbe7a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment