Spaces:
Running
Running
scratch0-5
/
utils
/VMMakerJS.package
/JSCodeGenerator.class
/instance
/fileHeaderVersionStampForSourceClass..st
JS code generator | |
fileHeaderVersionStampForSourceClass: sourceClass | |
"Answer a suitable version stamp to include in the header." | |
| slangDescription sourceDescription | | |
slangDescription := self class monticelloDescriptionFor: self class. | |
sourceClass ifNotNil: | |
[sourceDescription := [sourceClass monticelloDescription] | |
on: MessageNotUnderstood | |
do: [:ex| self class monticelloDescriptionFor: sourceClass]]. | |
^String streamContents: | |
[:s| | |
s nextPutAll: '/* Automatically generated by\ ' withCRs. | |
s nextPutAll: slangDescription. | |
sourceDescription ifNotNil: | |
[s nextPutAll: '\ from\ ' withCRs; nextPutAll: (sourceDescription copyReplaceAll: '\' withCRs with: '\ ' withCRs)]. | |
s cr; nextPutAll: ' */'; cr] |