nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b99687a
)
src: Update literal to properly support underscores in decimal literals
author
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 28 Jul 2015 15:32:03 +0000
(11:32 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 28 Jul 2015 15:32:03 +0000
(11:32 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
src/literal.nit
patch
|
blob
|
history
diff --git
a/src/literal.nit
b/src/literal.nit
index
eb04e7a
..
f5f70b0
100644
(file)
--- a/
src/literal.nit
+++ b/
src/literal.nit
@@
-93,7
+93,7
@@
end
redef class ADecIntExpr
redef fun accept_literal(v)
do
- value = self.n_number.text.to_i
+ value = self.n_number.text.remove_underscores.to_i
end
end
@@
-142,7
+142,7
@@
redef class ADecByteExpr
redef fun accept_literal(v)
do
var t = self.n_bytenum.text
- value = t.substring(0, t.length - 2).to_i.to_b
+ value = t.substring(0, t.length - 2).remove_underscores.to_i.to_b
end
end