public static void Load <T>(this ISymbolTable table, string data)
            where T : ISymbol
        {
            var symbols = JsonConvert.DeserializeObject <IList <T> >(data);

            foreach (var symbol in symbols)
            {
                table.Add(symbol);
            }
        }
예제 #2
0
 public void InitializeVariable(ISymbolTable symbolTable, Guid questionId)
 {
     symbolTable.Add(questionId, default(int));
 }
예제 #3
0
        } // end IsDefined method.

        //--- add a symbol to the current scope.
        //--- returns false if name already in current table.
        public bool Add(ISymbol symbol)
        {
            return(symbols.Add(symbol));
        }