1
-----------------------------------------------------------------------
2
-----------------------------------------------------------------------
4
with GNAT.Strings; use GNAT.Strings;
5
with Traces; use Traces;
9
package body Language_Utils is
11
---------------------------
12
-- Parse_File_Constructs --
13
---------------------------
15
procedure Parse_File_Constructs
16
(Lang : access Language_Root'Class;
17
File_Name : GNATCOLL.VFS.Virtual_File;
18
Result : out Construct_List)
20
Buffer : GNAT.Strings.String_Access;
22
Buffer := GNATCOLL.VFS.Read_File (File_Name);
24
if Buffer /= null then
25
-- ??? The call to Locale_To_UTF8 is not optimal
27
(Lang, Glib.Convert.Locale_To_UTF8 (Buffer.all), Result);
33
Trace (Exception_Handle, E);
35
end Parse_File_Constructs;