Added MyLanguage example

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@14928 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Stefan Urbanek 2002-11-05 20:04:24 +00:00
parent 54bb5b32d2
commit 7f265245c1
4 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,35 @@
#
# MyLanguage language bundle
#
# @COPYRIGHT@
#
GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
include $(GNUSTEP_MAKEFILES)/common.make
###########################################################################
# Language name
BUNDLE_NAME = MyLanguage
MyLanguage_PRINCIPAL_CLASS = MyLanguageEngine
###########################################################################
# Files
MyLanguage_OBJC_FILES = \
MyLanguageEngine.m
# MyLanguage_BUNDLE_LIBS += -lmylanguage
###########################################################################
BUNDLE_EXTENSION := .stlanguage
BUNDLE_INSTALL_DIR:=$(GNUSTEP_INSTALLATION_DIR)/Library/StepTalk/Languages
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUMakefile.postamble

View file

@ -0,0 +1,16 @@
/**
MyLanguageEngine
@COPYRIGHT@
Written by: @AUTHOR@
Date: @DATE@
*/
#import <StepTalk/STEngine.h>
@interface MyLanguageEngine:STEngine
{
}
@end

View file

@ -0,0 +1,27 @@
/**
MyLanguageEngine
@COPYRIGHT@
Written by: @AUTHOR@
Date: @DATE@
*/
#import "MyLanguageEngine.h"
@implementation MyLanguageEngine
- (id) executeCode:(NSString *)sourceCode
inEnvironment:(STEnvironment *)env
{
id retval = nil;
/* execute the code sourceCode using environment env */
/* use [env objectDictionary] to get environment objects
(see STEnvironment.h to see what you can do) */
/* retval = return value from the interpreter; */
return retval;
}
@end

View file

@ -0,0 +1,4 @@
{
/* Array of file types of your language scripts */
STFileTypes = ( "mylang" );
}