Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
f27bbac0
Commit
f27bbac0
authored
Apr 23, 2017
by
Maxime Perrotin
Browse files
Basic type check in range expression
parent
1a60340a
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/ogParser.py
View file @
f27bbac0
...
...
@@ -4180,6 +4180,12 @@ def for_range(root, context):
result
[
'stop'
]
=
expr
[
0
]
else
:
errors
.
append
(
'Incorrect range expression'
)
# Basic check that range element basic types are all integers
for
each
in
expr
:
basic
=
find_basic_type
(
each
.
exprType
)
if
not
basic
.
kind
.
startswith
(
"Integer"
):
errors
.
append
(
u
"Expression {} is not evaluated to integer"
.
format
(
each
.
inputString
))
return
result
,
errors
,
warnings
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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