/// <summary> /// For the given parent symbol this method extracts an identifier from the given node and /// returns it if it isn't already used for a child symbol of the parent symbol's scope. /// Else it raises a generator exception /// </summary> /// <param name="parentObject"></param> /// <param name="node"></param> /// <returns></returns> protected string TranslateChildSymbolName(IIronyAstObjectWithScope parentObject, ParseTreeNode node) { //Read the name of the new child symbol var childSymbolName = GenUtils.Translate_Identifier(node); //Make sure the child symbol name is not used inside the parent scope if (parentObject.ChildScope.SymbolExists(childSymbolName)) { CompilationLog.RaiseGeneratorError <int>("Child symbol name already used", node); } return(childSymbolName); }
public static CommandBlock Create(IIronyAstObjectWithScope parentObject, string localVariableRoleName) { return(new CommandBlock(parentObject.ChildScope, localVariableRoleName)); }
public static CommandBlock Create(IIronyAstObjectWithScope parentObject) { return(new CommandBlock(parentObject.ChildScope)); }
internal bool ContainsScope(IIronyAstObjectWithScope scopeSymbol) { return(ContainsScope(scopeSymbol.ChildScope)); }
internal GMacRefResContextInfo(IIronyAstObjectWithScope scopeSymbol) { MainScope = scopeSymbol.ChildScope; }
internal GMacRefResContextInfo CloseScope(IIronyAstObjectWithScope scopeSymbol) { return(CloseScope(scopeSymbol.ChildScope)); }
public new static CompositeExpression Create(IIronyAstObjectWithScope parentObject, string localVariableRoleName) { return(new CompositeExpression(parentObject.ChildScope, localVariableRoleName)); }
public new static CompositeExpression Create(IIronyAstObjectWithScope parentObject) { return(new CompositeExpression(parentObject.ChildScope)); }