--- layout: fc_discuss_archives title: Message 3 from Frama-C-discuss on December 2011 ---
Hello, On 30/11/2011 19:05, florent garnier wrote: > To define new statements, I need to be able to define new expressions. > > " > val new_exp : loc:Cil_types.location -> Cil_types.exp_node -> Cil_types.exp > " > > However, I don't know which value I should assign to > loc:Cil_types.location parameter. new_exp is indeed the good function to use. There are some specialized cases in Cil as well, mainly for constants. The location is mainly relevant for nodes that come directly from the parsed files. It is exclusively used in messages to tell the user which part of the code is concerned. Basically there are three possible choices: - you have an explicit location to give - you can use Cil_const.CurrentLoc.get, which will give you the location of the currently visited node (more precisely the most recently visited node that contains location information) - you can use Cil_datatype.Location.unknown (a dummy location) Hope this helps, -- E tutto per oggi, a la prossima volta Virgile