Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-sapl
Commits
484fb866
Commit
484fb866
authored
Mar 20, 2016
by
Laszlo Domoszlai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix stringifying floating point numbers
parent
b460c84b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/Sapl/SaplTokenizer.icl
src/Sapl/SaplTokenizer.icl
+4
-1
No files found.
src/Sapl/SaplTokenizer.icl
View file @
484fb866
...
...
@@ -195,12 +195,15 @@ where
True
=
let
(_,
newbase
,
t
)
=
read_token
base
inp
in
tokens_
newbase
[
t
:
ts
]
=
reverse
ts
toStringR
::
Real
->
String
toStringR
r
=
if
(
r
-
toReal
(
entier
r
)
==
0.0
)
(
toString
r
+++
".0"
)
(
toString
r
)
instance
toString
Literal
where
toString
(
LString
ustr
)
=
"
\"
"
+++
toJSLiteral
ustr
+++
"
\"
"
toString
(
LChar
uchr
)
=
"'"
+++
toJSLiteral
uchr
+++
"'"
toString
(
LInt
int
)
=
toString
int
toString
(
LReal
real
)
=
toString
real
toString
(
LReal
real
)
=
toString
R
real
toString
(
LBool
True
)
=
"True"
toString
(
LBool
False
)
=
"False"
...
...
Write
Preview
Markdown
is supported
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