syntheticLiteralNodeFor

fun syntheticLiteralNodeFor(literalValue: A_BasicObject, literalAsString: A_String = when { literalValue.isString -> literalValue as A_String literalValue.isInstanceOf(safePrintRange) -> stringFrom(literalValue.toString()) literalValue.isInstanceOf(integers) -> stringFrom("(a big integer)") else -> stringFrom(literalValue.toString()) }, optionalGeneratingPhrase: A_Phrase = nil): A_Phrase

Create a literal phrase from an AvailObject, the literal value itself. Automatically wrap the value inside a synthetic literal token. Use the specified literalAsString as the string form of the literal for printing.

Return

The new literal phrase.

Parameters

literalValue

The value that this literal phrase should produce.

literalAsString

The optional A_String used to describe this literal.

optionalGeneratingPhrase

The optional A_Phrase from which this literal node was created.