soiz1's picture
Upload folder using huggingface_hub
8f3f8db verified
raw
history blame contribute delete
435 Bytes
public
addClassVarsFor: aClass
"Add the class variables for the given class to the code base as constants."
| val node |
aClass classPool associationsDo: [:assoc |
val := assoc value.
(useSymbolicConstants and:[self isJSLiteral: val])
ifTrue:[node := TDefineNode new setName: assoc key asString value: assoc value]
ifFalse:[node := TConstantNode new setValue: assoc value].
constants at: assoc key asString put: node].