Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
6ff768bb
Commit
6ff768bb
authored
Jul 16, 2014
by
dbarbera
Browse files
Check that mod/rem expressions are applied to integer types
parent
904d5b75
Changes
1
Hide whitespace changes
Inline
Side-by-side
ogParser.py
View file @
6ff768bb
...
...
@@ -1081,6 +1081,13 @@ def arithmetic_expression(root, context):
msg
=
'Check that all your numerical data types have a range constraint'
errors
.
append
(
error
(
root
,
msg
))
if
root
.
type
in
(
lexer
.
REM
,
lexer
.
MOD
):
for
ty
in
(
expr
.
left
.
exprType
,
expr
.
right
.
exprType
):
if
not
is_integer
(
ty
):
msg
=
'Mod/Rem expressions can only applied to Integer types'
errors
.
append
(
error
(
root
,
msg
))
break
return
expr
,
errors
,
warnings
...
...
Write
Preview
Supports
Markdown
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