|
|
Class: ProgrammingLanguage
Object
|
+--ProgrammingLanguage
|
+--STXJavaScriptLanguage
|
+--SmalltalkLanguage
- Package:
- stx:libbasic
- Category:
- Kernel-Languages
- Version:
- rev:
1.10
date: 2009/12/04 11:21:32
- user: cg
- file: ProgrammingLanguage.st directory: libbasic
- module: stx stc-classLibrary: libbasic
provide info about which tools are to be used for code in
a programming language
Signal constants
-
languageQuerySignal
-
accessing
-
all
-
Anwers a collection of all available languages
-
current
-
ProgrammingLanguage current
-
instance
-
return this languages singleton
enumerating
-
allDetect: aBlock ifNone: exceptionValue
-
-
allDo: aBlock
-
initialization
-
initialize
-
instance creation
-
forFile: aFilename
-
Answers a language for given source file. If none is found,
SmalltalkLanguage is returned (to provide backward compatibility)
-
forStream: aStream
-
Answers a language for given source stream. If none is found,
SmalltalkLanguage is returned (to provide backward compatibility)
-
named: aString
-
-
named: aString ifNone: aBlock
-
private
-
instancesDetect: detectBlock ifNone: failBlock
-
testing
-
isAvailable: langName
-
accessing
-
name
-
Answers a human-readable name of myself:
'Smalltalk' for SmalltalkLanguage,
'Ruby' for RubyLanguage
...
** This method raises an error - it must be redefined in concrete classes **
-
sourceFileSuffix
-
Answers a default suffix for source files, i.e. 'st' for Smalltalk,
'js' for JavaScript or 'rb' for Ruby', etc.
** This method raises an error - it must be redefined in concrete classes **
accessing - classes
-
compilerClass
-
Answer a class suitable for compiling a source code in 'my' language
** This method raises an error - it must be redefined in concrete classes **
-
evaluatorClass
-
Answer a class suitable for evaluating a doIt in 'my' language
-
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.
-
formatterClass
-
Answer a class suitable for prettyPrinting (indenting) code in 'my' language.
It is ok to return nil, which means that the browser will not be able to prettyprint.
-
parserClass
-
Answer a class suitable for parsing a source code in 'my' language
** This method raises an error - it must be redefined in concrete classes **
-
sourceFileReaderClass
-
Answers a class that can be used for reading & compiling source files
** This method raises an error - it must be redefined in concrete classes **
-
sourceFileWriterClass
-
Answers a class is used for source file writing (i.e. file-out)
** This method raises an error - it must be redefined in concrete classes **
-
syntaxHighlighterClass
-
Answers a class used by browser and debugger to colorze code.
It is OK to return nil, which means that the code is shown as-is
printing & storing
-
storeOn: aStream
-
queries
-
canReadSourceFile: aFilename
-
Answers true iff file contains source code in 'my' language
testing
-
isRuby
-
true iff this is the ruby language
-
isSTXJavaScript
-
true iff this is the ST/X-javascript language
-
isSmalltalk
-
true iff this is the smalltalk language
utilities - file in/file out
-
fileIn: aFilename
-
-
fileInStream: aStream
-
utilities - source code
-
methodTemplate
-
return a method definition template string (or nil)
-
writeComment: aStringOrStringCollection on: aStream
-
Utility method - writes a comment to a stream,
using proper syntax
|