예제 #1
0
        /// <summary>
        /// Add an entry in this table for a macro input parameter without a defining command
        /// </summary>
        /// <param name="lvalue"></param>
        /// <returns></returns>
        public HlLValueDefinitionInfo AddDefinition(SymbolProcedureParameter lvalue)
        {
            List <HlLValueDefinitionInfo> lvalueDefList;

            if (_lValuesDictionary.TryGetValue(lvalue.ObjectName, out lvalueDefList) == false)
            {
                lvalueDefList = new List <HlLValueDefinitionInfo>();

                _lValuesDictionary.Add(lvalue.ObjectName, lvalueDefList);
            }

            var defInfo = new HlLValueDefinitionInfo(lvalueDefList.Count, lvalue, null);

            lvalueDefList.Add(defInfo);

            return(defInfo);
        }
예제 #2
0
        /// <summary>
        /// Add definition for an l-value
        /// </summary>
        /// <param name="defSt"></param>
        /// <returns></returns>
        public HlLValueDefinitionInfo AddDefinition(HlCommandInfo defSt)
        {
            var lvalue = defSt.LhslValue;
            List <HlLValueDefinitionInfo> lvalueDefList;

            if (_lValuesDictionary.TryGetValue(lvalue.ObjectName, out lvalueDefList) == false)
            {
                lvalueDefList = new List <HlLValueDefinitionInfo>();

                _lValuesDictionary.Add(lvalue.ObjectName, lvalueDefList);
            }

            var defInfo = new HlLValueDefinitionInfo(lvalueDefList.Count, lvalue, defSt);

            lvalueDefList.Add(defInfo);

            return(defInfo);
        }