Commits

Sébastien Ferré committed 98d3a52

Add of pretty-printing tokens.

  • Participants
  • Parent commits 49b294c

Comments (0)

Files changed (1)

     [<'tok; toks = list_of_stream>] -> tok::toks
   | [<>] -> []
 
-let stream_of_list : t_list -> t_stream = Stream.of_list
+let rec of_list : t_list -> t_stream =
+  fun toks -> Stream.of_list
+      (List.filter
+	 (function
+	     PP_tilda | PP_space | PP_cut | PP_break (_,_) -> false
+	   | _ -> true
+	 ) toks
+      )
 
 (* get the string representation of the token *)
 type space_of_token = Sep | PonctL | PonctR | Op | Word