private Dict Visit(DictAST dictAST) { Dict dictionary = new Dict(); foreach (KeyValuePairAST keyValuePairAST in dictAST.Parameters) { KeyValuePair <string, object> keyValuePair = Visit(keyValuePairAST); dictionary.Add(keyValuePair.Key, keyValuePair.Value); } return(dictionary); }
private ConfigureAST Block() { AST declareAST = Declare(); if (currentToken.Type == TokenType.LBRC) { DictAST dictAST = Configure(); return(new ConfigureAST(declareAST, dictAST)); } else { return(new ConfigureAST(declareAST, new DictAST(new List <KeyValuePairAST>()))); } }