Exemplo n.º 1
0
        /// <summary>
        /// Given a parse tree node in the current active code unit this creates a code location
        /// object to be added to a translated language symbol
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public IronyAstObjectCodeLocation GetCodeLocation(ParseTreeNode node)
        {
            if (HasParentProjectCompiler == false)
            {
                return(null);
            }

            return(IronyAstObjectCodeLocation.Create(ParentProjectCompiler.Project, node));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add a parse node for this language symbol
        /// </summary>
        /// <param name="codeLocation"></param>
        /// <returns></returns>
        public IronyAstObjectCodeLocation AddCodeLocation(IronyAstObjectCodeLocation codeLocation)
        {
            if (ReferenceEquals(_codeLocations, null))
            {
                _codeLocations = new List <IronyAstObjectCodeLocation>();
            }

            _codeLocations.Add(codeLocation);

            return(codeLocation);
        }