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
4a870039
Commit
4a870039
authored
Feb 16, 2015
by
Maxime Perrotin
Browse files
Add range check to DCL parsing
parent
69d39e6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
opengeode/ogParser.py
View file @
4a870039
...
...
@@ -1756,7 +1756,10 @@ def variables(root, ta_ast, context):
try
:
fix_expression_types
(
expr
,
context
)
def_value
=
expr
.
right
except
(
AttributeError
,
TypeError
)
as
err
:
basic
=
find_basic_type
(
asn1_sort
)
if
basic
.
kind
.
startswith
((
'Integer'
,
'Real'
)):
check_range
(
basic
,
find_basic_type
(
def_value
.
exprType
))
except
(
AttributeError
,
TypeError
,
Warning
)
as
err
:
#print (traceback.format_exc())
errors
.
append
(
'Types are incompatible in DCL assignment: '
'left ('
+
...
...
tests/regression/test-types/Makefile
View file @
4a870039
...
...
@@ -6,7 +6,7 @@ edit:
$(OPENGEODE)
function1.pr system_structure.pr
test-parse
:
$(OPENGEODE)
functin1.pr system_structure.pr
--check
$(OPENGEODE)
functi
o
n1.pr system_structure.pr
--check
test-ada
:
function1.ali
...
...
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