nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a3734e
)
interpreter: Added support for prefixed chars
author
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 22 Mar 2016 15:21:54 +0000
(11:21 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 22 Mar 2016 19:00:25 +0000
(15:00 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
src/interpreter/naive_interpreter.nit
patch
|
blob
|
history
diff --git
a/src/interpreter/naive_interpreter.nit
b/src/interpreter/naive_interpreter.nit
index
23d3ba1
..
213680e
100644
(file)
--- a/
src/interpreter/naive_interpreter.nit
+++ b/
src/interpreter/naive_interpreter.nit
@@
-1934,6
+1934,8
@@
end
redef class ACharExpr
redef fun expr(v)
do
redef class ACharExpr
redef fun expr(v)
do
+ if is_ascii then return v.byte_instance(self.value.as(not null).ascii)
+ if is_code_point then return v.int_instance(self.value.as(not null).code_point)
return v.char_instance(self.value.as(not null))
end
end
return v.char_instance(self.value.as(not null))
end
end