nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b167989
)
syntax: add VariableContext::to_s
author
Jean Privat
<jean@pryen.org>
Mon, 22 Jun 2009 15:50:55 +0000
(11:50 -0400)
committer
Jean Privat
<jean@pryen.org>
Wed, 24 Jun 2009 19:47:49 +0000
(15:47 -0400)
Used to debug.
Signed-off-by: Jean Privat <jean@pryen.org>
src/syntax/control_flow.nit
patch
|
blob
|
history
diff --git
a/src/syntax/control_flow.nit
b/src/syntax/control_flow.nit
index
2eddf2c
..
f693eaa
100644
(file)
--- a/
src/syntax/control_flow.nit
+++ b/
src/syntax/control_flow.nit
@@
-161,6
+161,18
@@
abstract class VariableContext
end
end
end
+
+ redef meth to_s
+ do
+ var s = new Buffer
+ s.append(node.locate)
+ for v in _all_variables do
+ var t = stype(v)
+ if t == null then continue
+ s.append(" {v}:{t}")
+ end
+ return s.to_s
+ end
end
class RootVariableContext