Signed-off-by: Jean Privat <jean@pryen.org>
14 files changed:
abstract class Aliment end
abstract class Aliment end
-class Herbe special Aliment end
+class Herbe super Aliment end
class Animal
type REGIME: Aliment
class Animal
type REGIME: Aliment
redef type REGIME: Herbe
end
redef type REGIME: Herbe
end
redef var nodes: Array[XMLNode] = new Array[XMLNode]
redef var nodes: Array[XMLNode] = new Array[XMLNode]
\r
Voici la syntaxe d'une interface :\r
\begin{lstlisting}[language=Nit]\r
\r
Voici la syntaxe d'une interface :\r
\begin{lstlisting}[language=Nit]\r
- interface nom_interface [special interface_mere...]\r
+ interface nom_interface [super interface_mere...]\r
...\r
end\r
\end{lstlisting}\r
...\r
end\r
\end{lstlisting}\r
Dans cet exemple nous avons redéfini la méthode to\_s de la classe String afin de retourner toutes les chaines en majuscules.\r
\r
\chapter{Importation de la bibliothèque standard}\r
Dans cet exemple nous avons redéfini la méthode to\_s de la classe String afin de retourner toutes les chaines en majuscules.\r
\r
\chapter{Importation de la bibliothèque standard}\r
-Il faut noter que les modules de la bibliothèque standard sont toujours importés implicitement lors de la compilation si aucun import n'a été spécifié. Par exemple il n'est pas nécessaire d'importer le module string pour utiliser la classe String.
\ No newline at end of file
+Il faut noter que les modules de la bibliothèque standard sont toujours importés implicitement lors de la compilation si aucun import n'a été spécifié. Par exemple il n'est pas nécessaire d'importer le module string pour utiliser la classe String.\r
super Prod
end
abstract class APropExternCall
super Prod
end
abstract class APropExternCall
end
class ALocalPropExternCall
end
class ALocalPropExternCall
readable var _n_methid: AMethid
end
class AFullPropExternCall
readable var _n_methid: AMethid
end
class AFullPropExternCall
readable var _n_classid: TClassid
readable var _n_quad: nullable TQuad = null
readable var _n_methid: AMethid
end
class AInitPropExternCall
readable var _n_classid: TClassid
readable var _n_quad: nullable TQuad = null
readable var _n_methid: AMethid
end
class AInitPropExternCall
readable var _n_classid: TClassid
end
class ASuperExternCall
readable var _n_classid: TClassid
end
class ASuperExternCall
readable var _n_kwsuper: TKwsuper
end
abstract class ACastExternCall
readable var _n_kwsuper: TKwsuper
end
abstract class ACastExternCall
end
class ACastAsExternCall
end
class ACastAsExternCall
readable var _n_from_type: AType
readable var _n_kwas: TKwas
readable var _n_to_type: AType
end
class AAsNullableExternCall
readable var _n_from_type: AType
readable var _n_kwas: TKwas
readable var _n_to_type: AType
end
class AAsNullableExternCall
readable var _n_type: AType
readable var _n_kwas: TKwas
readable var _n_kwnullable: TKwnullable
end
class AAsNotNullableExternCall
readable var _n_type: AType
readable var _n_kwas: TKwas
readable var _n_kwnullable: TKwnullable
end
class AAsNotNullableExternCall
readable var _n_type: AType
readable var _n_kwas: TKwas
readable var _n_kwnot: TKwnot
readable var _n_type: AType
readable var _n_kwas: TKwas
readable var _n_kwnot: TKwnot
readable var _n_kwbreak: TKwbreak
end
class AModuleName
readable var _n_kwbreak: TKwbreak
end
class AModuleName
readable var _n_quad: nullable TQuad = null
readable var _n_path: List[TId] = new List[TId]
readable var _n_id: TId
readable var _n_quad: nullable TQuad = null
readable var _n_path: List[TId] = new List[TId]
readable var _n_id: TId
end
extern C `{int*`}
end
extern D
end
extern C `{int*`}
end
extern D
fun isa_a : Bool is extern import C as(A)
end
class D # triangle
fun isa_a : Bool is extern import C as(A)
end
class D # triangle
init do end
fun as_a : A is extern import D as(A)
end
init do end
fun as_a : A is extern import D as(A)
end
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-extern A special Pointer
new is extern import p
new with_args( x : Int, a : A ) is extern
new is extern import p
new with_args( x : Int, a : A ) is extern
# limitations under the License.
extern A
# limitations under the License.
extern A
new is extern
redef fun to_s : String is extern import String::from_cstring
new is extern
redef fun to_s : String is extern import String::from_cstring
redef fun work is extern
end
redef fun work is extern
end
redef fun nity do print "B"
end
redef fun nity do print "B"
end
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-extern ExternInt special Pointer
+extern ExternInt super Pointer
new as_0 is extern
new as_1 is extern
new as_2 is extern
new as_0 is extern
new as_1 is extern
new as_2 is extern
redef fun extern_echo is extern
redef fun echo do print "B"
end
redef fun extern_echo is extern
redef fun echo do print "B"
end
redef fun id : String is extern import super, String::from_cstring, String::to_cstring
end
redef fun id : String is extern import super, String::from_cstring, String::to_cstring
end