eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SmalltalkLanguage':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SmalltalkLanguage


Inheritance:

   Object
   |
   +--ProgrammingLanguage
      |
      +--SmalltalkLanguage

Package:
stx:libbasic
Category:
Kernel-Languages
Version:
rev: 1.44 date: 2021/11/08 15:15:22
user: stefan
file: SmalltalkLanguage.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


provide info about which tools are to be used for smalltalk code

copyright

COPYRIGHT (c) 2009 by Jan Vrany 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.

Instance protocol:

accessing
o  id
Return a unique integer id of this language.
For languages built into the VM, it must be < 32.
This id is used as index to various structures used by runtime
(bytecode set ?).
cg: this ought to be better documented - I have no idea, where it is used

o  name
Answers a human-readable name of myself:
'Smalltalk' for SmalltalkLanguage,
'Ruby' for RubyLanguage
...

o  sourceFileSuffix
Answers a default suffix for source files, i.e.
'st' for Smalltalk, 'js' for JavaScript or 'rb' for Ruby', etc.

accessing-classes
o  codeGeneratorClass
Answers a class that can generate code

o  compilerClass
Answer a class suitable for compiling a source code in 'my' language

o  compilerClassForInteractiveTools
( an extension from the stx:libtool package )
Answer a compiler class suitable for usage in interactive tools.
Such class may better integrate into the IDE and register for undo/redo
and/or do more checks and so on. Defaults to #compilerClass

o  compilerWithBreakpointSupportClass
Answer a class suitable for compiling a source code with breakpoints
in 'my' language

o  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.

o  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.

o  parserClass
Answer a class suitable for parsing a source code in 'my' language

o  sourceFileReaderClass
Answers a class that can be used for reading & compiling source files

o  sourceFileWriterClass
Answers a class is used for source file writing (i.e. file-out)

o  syntaxHighlighterClass
return the class to use for syntaxHighlighting (prettyPrinting) this class -
this can be redefined in special classes, to highlight classes with
Lisp, Prolog, ASN1, Basic :-) or whatever syntax.

mimicry
o  , anObject
Emulates symbol behavior. This is sometimes required
as 'Smalltalk language' is used by legacy code to access
the current language setting.
Future versions should contain class Locale.
cg: this is crab, who needs this?


** This is an obsolete interface - do not use it (it may vanish in future versions) **

queries
o  canBeCompiled
true if compilable in the browser

source queries
o  bracketStrings
used for autoindent

o  commentStrings
EOL comment

o  methodDefinitionTemplateForSelector: aSelector andArgumentNames: argNames
given a selector, return a prototype definition string

Usage example(s):

     SmalltalkLanguage instance 
        methodDefinitionTemplateForSelector:#foo andArgumentNames:#()
     SmalltalkLanguage instance
        methodDefinitionTemplateForSelector:#+ andArgumentNames:#('aNumber')
     SmalltalkLanguage instance
        methodDefinitionTemplateForSelector:#foo:bar:baz: andArgumentNames:#('fooArg' 'barArg' 'bazArg')

testing
o  isSmalltalk
true iff I represent the smalltalk language



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:43:18 GMT