"
COPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
"{ Package: 'stx:libbasic' }"
ProgrammingLanguage subclass:#SmalltalkLanguage
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Kernel-Languages'
!
!SmalltalkLanguage class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
! !
!SmalltalkLanguage methodsFor:'accessing'!
name
"
Answers a human-readable name of myself:
'Smalltalk' for SmalltalkLanguage,
'Ruby' for RubyLanguage...
"
^'Smalltalk'
"Modified: / 16-08-2009 / 10:53:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
sourceFileSuffix
"
Answers a default suffix for source files, i.e.
'st' for Smalltalk, 'js' for JavaScript or 'rb' for Ruby'
"
^'st'
"Modified: / 16-08-2009 / 10:53:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!SmalltalkLanguage methodsFor:'accessing - classes'!
compilerClass
"
Answer a class suitable for compiling a source code
in 'my' language
"
^Smalltalk::Compiler
"Modified: / 21-08-2009 / 13:02:27 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
explainerClass
"
Answers a class used by browser and debugger to
show some hints about the code. It is OK to return
nil, which means that there is no explainer for given
language.
"
"return nil by default"
^Explainer
"Created: / 21-08-2009 / 08:49:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
parserClass
"
Answer a class suitable for parsing a source code
in 'my' language
"
^Smalltalk::Parser
"Modified: / 21-08-2009 / 13:02:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
sourceFileReaderClass
"
Answers a class that can be used for
reading & compiling source files
"
^SmalltalkChunkFileSourceReader
"Modified: / 16-08-2009 / 12:29:39 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
sourceFileWriterClass
"
Answers a class is used for source file
writing (i.e. file-out)
"
^SmalltalkChunkFileSourceWriter
"Modified: / 16-08-2009 / 09:51:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!SmalltalkLanguage methodsFor:'mimicry'!
, anObject
"
Emulates symbol behavior. This is sometimes required
as Smalltalk language is used by legacy code to access
current language. Future versions should contain class
Locale.
"
^Language , anObject
"Created: / 22-08-2009 / 09:33:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
asSymbol
"
Returns a language symbol. This is sometimes required
as Smalltalk language is used by legacy code to access
current language. Future versions should contain class
Locale.
"
^Language
"Created: / 22-08-2009 / 09:33:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!SmalltalkLanguage methodsFor:'testing'!
isSmalltalk
^true
"Created: / 16-08-2009 / 09:01:38 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!SmalltalkLanguage class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libbasic/SmalltalkLanguage.st,v 1.4 2009-09-30 12:06:45 fm Exp $'
!
version_CVS
^ '$Header: /cvs/stx/stx/libbasic/SmalltalkLanguage.st,v 1.4 2009-09-30 12:06:45 fm Exp $'
!
version_SVN
^'Id: SmalltalkLanguage.st 10468 2009-08-22 08:34:50Z vranyj1 '
! !