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
ec843751
Commit
ec843751
authored
Jul 20, 2014
by
dbarbera
Browse files
Added type analysis for append expressions
parent
a04ca83b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ogParser.py
View file @
ec843751
...
...
@@ -1151,7 +1151,11 @@ def append_expression(root, context):
''' Append expression analysis '''
expr
,
errors
,
warnings
=
binary_expression
(
root
,
context
)
# TODO: Check types
for
bty
in
(
find_basic_type
(
expr
.
left
.
exprType
),
find_basic_type
(
expr
.
right
.
exprType
)):
if
bty
.
kind
!=
'SequenceOfType'
and
not
is_string
(
bty
):
msg
=
'Append can only be applied to types SequenceOf or String'
errors
.
append
(
error
(
root
,
msg
))
break
expr
.
exprType
=
expr
.
left
.
exprType
return
expr
,
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