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
44a39ffe
Commit
44a39ffe
authored
Apr 21, 2017
by
Maxime Perrotin
Browse files
Ada backend: fix unicode issues
parent
187633e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
44a39ffe
...
...
@@ -1747,7 +1747,7 @@ def _equality(expr):
if
basic
:
if
lbty
.
kind
==
'IntegerType'
:
# Cast right side to make sure it is the same integer type as left
right_str
=
'{}({})'
.
format
(
actual_type
,
right_str
)
right_str
=
u
'{}({})'
.
format
(
actual_type
,
right_str
)
ada_string
=
u
'({left} {op} {right})'
.
format
(
left
=
left_str
,
op
=
expr
.
operand
,
right
=
right_str
)
else
:
...
...
@@ -1777,7 +1777,7 @@ def _assign_expression(expr):
# assign the .Data and .Length parts properly
basic_left
=
find_basic_type
(
expr
.
left
.
exprType
)
if
basic_left
.
kind
in
(
'SequenceOfType'
,
'OctetStringType'
):
rlen
=
"{}'Length"
.
format
(
right_str
)
rlen
=
u
"{}'Length"
.
format
(
right_str
)
if
isinstance
(
expr
.
right
,
ogAST
.
PrimSubstring
):
strings
.
append
(
u
"{lvar}.Data(1..{rvar}'Length) := {rvar};"
.
format
(
lvar
=
left_str
,
rvar
=
right_str
))
...
...
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