本文整理汇总了C++中SNode::appendNode方法的典型用法代码示例。如果您正苦于以下问题:C++ SNode::appendNode方法的具体用法?C++ SNode::appendNode怎么用?C++ SNode::appendNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SNode
的用法示例。
在下文中一共展示了SNode::appendNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: injectNewOperation
void CompilerLogic :: injectNewOperation(SNode node, _CompilerScope& scope, int operation, ref_t elementType, ref_t targetRef)
{
SNode operationNode = node.injectNode((LexicalType)operation, targetRef);
int size = defineStructSize(scope, targetRef, elementType, false);
if (size != 0)
operationNode.appendNode(lxSize, size);
}
示例2: if
void CompilerLogic :: injectOperation(SNode node, _CompilerScope& scope, _Compiler& compiler, int operator_id, int operationType, ref_t& reference, ref_t type)
{
int size = 0;
if (operationType == lxBinArrOp) {
// HOTFIX : define an item size for the binary array operations
size = -defineStructSize(scope, V_BINARYARRAY, type);
}
if (reference == V_BINARY && type != 0) {
reference = scope.attributeHints.get(type);
}
else if (reference == V_OBJECT && type != 0) {
reference = scope.attributeHints.get(type);
}
bool inverting = IsInvertedOperator(operator_id);
SNode operationNode = node.injectNode((LexicalType)operationType, operator_id);
if (size != 0) {
// HOTFIX : inject an item size for the binary array operations
operationNode.appendNode(lxSize, size);
}
if (reference == V_FLAG) {
if (!scope.branchingInfo.reference) {
// HOTFIX : resolve boolean symbols
ref_t dummy;
resolveBranchOperation(scope, compiler, IF_MESSAGE_ID, scope.boolReference, dummy);
}
reference = scope.branchingInfo.reference;
if (inverting) {
operationNode.appendNode(lxIfValue, scope.branchingInfo.falseRef);
operationNode.appendNode(lxElseValue, scope.branchingInfo.trueRef);
}
else {
operationNode.appendNode(lxIfValue, scope.branchingInfo.trueRef);
operationNode.appendNode(lxElseValue, scope.branchingInfo.falseRef);
}
}
}
示例3: injectVirtualCode
void CompilerLogic :: injectVirtualCode(SNode node, _CompilerScope& scope, ClassInfo& info, _Compiler& compiler)
{
SNode templateNode = node.appendNode(lxTemplate);
// auto generate get&type message if required
ClassMap::Iterator c_it = scope.typifiedClasses.getIt(node.argument);
while (!c_it.Eof()) {
if (c_it.key() == node.argument) {
int message = encodeMessage(*c_it, GET_MESSAGE_ID, 0);
SNode methodNode = templateNode.appendNode(lxClassMethod, message);
compiler.injectVirtualReturningMethod(methodNode, THIS_VAR);
}
c_it++;
}
// generate enumeration list
if ((info.header.flags & elDebugMask) == elEnumList && test(info.header.flags, elNestedClass)) {
compiler.generateEnumListMember(scope, info.header.parentRef, node.argument);
}
}