MetaAttribute is added to the SmPL AST. Reflect these changes in compute_lines.ml.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_cocci/compute_lines.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/parsing_cocci/compute_lines.ml b/parsing_cocci/compute_lines.ml index 4420e9524..4042b1025 100644 --- a/parsing_cocci/compute_lines.ml +++ b/parsing_cocci/compute_lines.ml @@ -907,11 +907,15 @@ and initialiser_list prev = dots is_init_dots prev initialiser (* for export *) and initialiser_dots x = dots is_init_dots None initialiser x -and attribute a = - match Ast0.unwrap a with - Ast0.Attribute(attr) -> - let ln = promote_mcode attr in - mkres a (Ast0.Attribute(attr)) ln ln +and attribute attr = + match Ast0.unwrap attr with + Ast0.Attribute(a) -> + let ln = promote_mcode a in + mkres attr (Ast0.Attribute(a)) ln ln + | Ast0.MetaAttribute(name,a,b) -> + let name = normal_mcode name in + let ln = promote_mcode name in + mkres attr (Ast0.MetaAttribute(name,a,b)) ln ln (* --------------------------------------------------------------------- *) -- 2.21.3 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
