Skip to content
This repository
Browse code

Left in some commented out code

  • Loading branch information...
commit 88e91899da7c6a4dc0c51a5ed727a235612e2933 1 parent 9bb6d66
Anthony Molinaro authored November 30, 2009

Showing 1 changed file with 6 additions and 27 deletions. Show diff stats Hide diff stats

  1. 33  src/protobuffs_compile.erl
33  src/protobuffs_compile.erl
@@ -159,33 +159,12 @@ collect_full_messages([{message, Name, Fields} | Tail], Acc) ->
159 159
         end
160 160
     end, [], Fields),
161 161
 
162  
-%    FieldsOut = lists:foldl(
163  
-%        fun (Input, TmpAcc) ->
164  
-%            case Input of
165  
-%                {Index, Rules, Type, Identifier, RealType, Other} ->
166  
-%                  case is_scalar_type (Type) of
167  
-%                    true -> [Input | TmpAcc];
168  
-%                    false ->
169  
-%                      PossibleTypes = all_possible_types (Type, ListName),
170  
-%
171  
-%                      NewType =
172  
-%                        case find_type (PossibleTypes, Acc) of
173  
-%                          false ->
174  
-%                            hd (PossibleTypes);
175  
-%                          ResultType ->
176  
-%                            ResultType
177  
-%                        end,
178  
-%                      [{Index, Rules, NewType, Identifier, RealType, Other} | TmpAcc]
179  
-%                  end;
180  
-%                _ -> TmpAcc
181  
-%            end
182  
-%        end, [], Fields),
183  
-    SubMessages = lists:foldl(
184  
-%        fun ({message, C, D}, TmpAcc) -> [{message, Name ++ "_" ++ C, D} | TmpAcc];
185  
-        fun ({message, C, D}, TmpAcc) -> [{message, [C | ListName], D} | TmpAcc];
186  
-            (_, TmpAcc) -> TmpAcc
187  
-        end, [], Fields),
188  
-    collect_full_messages(Tail ++ SubMessages, [{ListName, FieldsOut} | Acc]);
  162
+  SubMessages = lists:foldl(
  163
+    fun ({message, C, D}, TmpAcc) -> [{message, [C | ListName], D} | TmpAcc];
  164
+      (_, TmpAcc) -> TmpAcc
  165
+    end, [], Fields),
  166
+
  167
+  collect_full_messages(Tail ++ SubMessages, [{ListName, FieldsOut} | Acc]);
189 168
 collect_full_messages([{package, _Line1},
190 169
                        {bareword, _Line2, _PackageName},
191 170
                        {';', _Line3} | Tail], Acc) ->

0 notes on commit 88e9189

Please sign in to comment.
Something went wrong with that request. Please try again.