This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// also in https://www.onlinegdb.com/edit/xhqFlnv8f | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <malloc.h> | |
struct TypeData { | |
void (**virtualTable)(void); | |
char **methodNameList; | |
int methodNameListSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject should be attached to a prototype. The | |
Cyan code attached to the annotation is run in phase afterSemAn. Method | |
afterSemAn_checkSubprototype of the class of metaobject onSubprototype, | |
overridden from ICheckSubprototype_afterSemAn, just interpret the Cyan | |
statements attached to the annotation. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject are attached to a declaration. The | |
Cyan code attached to the annotation is run in phase afterSemAn. Method | |
afterSemAn_checkOverride of the class of metaobject onOverride, | |
overridden from ICheckOverride_afterSemAn, just interpret the Cyan | |
statements attached to the annotation. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject are attached to a declaration. The | |
Cyan code attached to the annotation is run in phase afterSemAn. Method | |
afterSemAn_checkDeclaration of the class of metaobject onDeclaration_afterSemAn, | |
overridden from ICheckDeclaration_afterSemAn, just interpret the Cyan | |
statements attached to the annotation. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// import a Cyan package | |
import cyan.math | |
import cyan.reflect | |
// import a Java package | |
import java.lang | |
@doc{* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotation 'overrideTest' should be attached to a method. | |
It generates a file with a prototype for testing with | |
the contents of the attached DSL whenever the attached | |
method is overridden in a subprototype. Let us see the details. | |
The following checks are made whenever the method attached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject should be attached to a local | |
variable. The attached DSL code is made in Myan, which supports | |
interpreted Cyan within parameterless methods declared with 'func': | |
func afterResTypes_codeToAdd { | |
// interpreted Cyan code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject should be attached to a method. | |
The attached DSL code is made in Myan, which supports interpreted Cyan | |
within parameterless methods declared with 'func': | |
func afterResTypes_codeToAdd { | |
// interpreted Cyan code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject should be attached to a prototype. | |
The attached DSL code is made in Myan, which supports interpreted Cyan | |
within parameterless methods declared with 'func': | |
func afterResTypes_codeToAdd { | |
// interpreted Cyan code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metaobjectTest | |
@doc{* | |
Annotations of this metaobject should be attached to a method or | |
method signature (of an interface). | |
The attached DSL code is made in Myan, which supports interpreted Cyan | |
within parameterless methods declared with 'func': | |
func afterResTypes_codeToAdd { |
NewerOlder