nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f73af2
)
model_utils: extract modifier list from mclassdef
author
Alexandre Terrasa
<alexandre@moz-code.org>
Sat, 3 May 2014 03:32:58 +0000
(23:32 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 7 May 2014 06:02:52 +0000
(
02:02
-0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model_utils.nit
patch
|
blob
|
history
diff --git
a/src/model_utils.nit
b/src/model_utils.nit
index
1c375ba
..
03ce173
100644
(file)
--- a/
src/model_utils.nit
+++ b/
src/model_utils.nit
@@
-290,6
+290,20
@@
redef class MAttribute
fun is_nullable: Bool do return intro.static_mtype isa MNullableType
end
+redef class MClassDef
+ # modifiers are keywords like redef, private etc.
+ fun modifiers: Array[String] do
+ var res = new Array[String]
+ if not is_intro then
+ res.add "redef"
+ else
+ res.add mclass.visibility.to_s
+ end
+ res.add mclass.kind.to_s
+ return res
+ end
+end
+
# Sorters
# Sort mmodules by their name