nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tools: remove 'locate' from nodes and visitor
[nit.git]
/
src
/
parser
/
xss
/
nodes.xss
diff --git
a/src/parser/xss/nodes.xss
b/src/parser/xss/nodes.xss
index
60a1ec9
..
e927a58
100644
(file)
--- a/
src/parser/xss/nodes.xss
+++ b/
src/parser/xss/nodes.xss
@@
-64,19
+64,14
@@
redef class PNode
# Thus, call "v.visit(e)" for each node e starting from the last child
fun visit_all_reverse(v: Visitor) is abstract
# Thus, call "v.visit(e)" for each node e starting from the last child
fun visit_all_reverse(v: Visitor) is abstract
- # Give a human readable location of the node.
- fun locate: String
- do
- if location == null then
- return "????"
- end
- return location.to_s
- end
-
# Debug method: output a message prefixed with the location.
fun printl(str: String)
do
# Debug method: output a message prefixed with the location.
fun printl(str: String)
do
- print("{locate}: {str}\n")
+ if location == null then
+ print("???: {str}\n")
+ else
+ print("{location}: {str}\n")
+ end
end
end
end
end