Changeset 96 for trunk/src/modules.erl


Ignore:
Timestamp:
08/19/10 09:26:03 (21 months ago)
Author:
dom
Message:

Continue work on include files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/modules.erl

    r93 r96  
    1010-export ([module_name/1]). 
    1111-export ([locate/2]). 
     12-export ([includes/1]). 
    1213 
    1314to_binary (File_name) -> 
     
    5253locate_line (_, _, []) -> 
    5354    unknown. 
     55 
     56includes (File) -> 
     57    includes_from_forms (epp_dodger: parse_file (File)). 
     58 
     59includes_from_forms ({error, _}=E) -> 
     60    E; 
     61includes_from_forms ({ok, Forms}) -> 
     62    Attributes = [A || {tree, attribute, _, A} <- Forms], 
     63    Includes = [I || {attribute, {atom, _, include}, [I]} <- Attributes], 
     64    [F || {string, _, F} <- Includes]. 
Note: See TracChangeset for help on using the changeset viewer.