/// <summary> /// Конструктор узла. /// </summary> /// <param name="comprehensive_namespace">Пространство имен, в которое вложено это пространство имен.</param> /// <param name="cont_unit">Модуль, в котором содержится это пространство имен.</param> /// <param name="name">Имя пространства имен.</param> /// <param name="scope">Область видимости пространства имен.</param> /// <param name="loc">Расположения заголовка пространства имен.</param> public common_namespace_node(namespace_node comprehensive_namespace, unit_node cont_unit, string name, SymbolTable.Scope scope, location loc) { _comprehensive_namespace = comprehensive_namespace; _cont_unit = cont_unit; _name = name; _scope = scope; _loc = loc; }
private int GetUnitReference(namespace_node nn) { return members[nn]; }
private void dot_node_as_namespace_ident(namespace_node nn, SyntaxTree.ident id_right, motivation mot) { SymbolInfo si_right = nn.find(id_right.name); if (si_right == null) { AddError(new MemberIsNotDeclaredInNamespace(id_right, get_location(id_right), nn)); } switch (mot) { case motivation.address_reciving: { return_addressed_value(ident_address_reciving(si_right, id_right)); return; } case motivation.expression_evaluation: { return_value(ident_value_reciving(si_right, id_right)); return; } case motivation.semantic_node_reciving: { return_semantic_value(ident_semantic_reciving(si_right, id_right)); return; } } throw new CompilerInternalError("Unsupported motivation"); }
public MemberIsNotDeclaredInNamespace(SyntaxTree.ident id, location loc, namespace_node nn) { _id = id; _loc = loc; _nn = nn; }