Changeset 4531 for trunk/compiler

Show
Ignore:
Timestamp:
10/22/08 16:34:55 (3 months ago)
Author:
pmoura
Message:

Updated the Logtalk compiler to print a warning when defining clauses for the built-in predicates term_expansion/2 and goal_expansion/2 without a reference to the built-in protocol "expanding".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4529 r4531  
    67226722 
    67236723 
     6724% definition of term and goal expansion predicates without reference to the "expanding" built-in protocol 
     6725 
     6726'$lgt_tr_head'(Head, _, _, Line, Input) :- 
     6727    functor(Head, Functor, 2), 
     6728    once((Functor == term_expansion; Functor == goal_expansion)), 
     6729    \+ '$lgt_pp_implemented_protocol_'(expanding, _, _, _), 
     6730    '$lgt_compiler_flag'(report, on), 
     6731    '$lgt_inc_compile_warnings_counter', 
     6732    nl, write('        WARNING!  Missing reference to the "expanding" built-in protocol: '), 
     6733    writeq(Functor/3), 
     6734    nl, '$lgt_report_compiler_error_line_number'(Line, Input), 
     6735    fail. 
     6736 
     6737 
    67246738% translate the head of a clause of a user defined predicate 
    67256739