Class TCasScriptParameterValue
Unit
CastleScript
Declaration
type TCasScriptParameterValue = class(TCasScriptValue)
Description
This is a very special CastleScript value, used to represent user-defined function parameter. This poses itself as a TCasScriptValue descendant, and it has working AssignValue and everything else. This way it can be used in "Variables" list for various CastleScriptParser functions.
Except it's cheating: it doesn't actually store the value. Instead, it has SourceValue property that is used when doing AssignValue. So AssignValue is handled by SourceValue.AssignValue, and Execute is handled by SourceValue.Execute, and so reading/writing this works.
The advantage: the exact type of function parameter is not known, and still we can parse the function expression. This is crucial for parser implementation: when parsing you need to create TCasScriptParameterValue instance, but you don't know actual type of parameter that will be passed here.
Hierarchy
Overview
Methods
Properties
Description
Methods
Properties
 |
property SourceValue: TCasScriptValue read FSourceValue write FSourceValue; |
|
Generated by PasDoc 0.13.0 on 2014-04-30 22:06:44
|