~npalix/coccinelle/upstream

« back to all changes in this revision

Viewing changes to parsing_cocci/ast_cocci.ml

  • Committer: Julia Lawall
  • Author(s): Jaskaran Singh
  • Date: 2020-08-01 20:32:45 UTC
  • Revision ID: git-v1:04f36d537b9f6c0c127d05184cccd21f1a46b952
Add meta attributes

Introduce changes to parse meta attributes and meta attribute
declarations in SmPL rules. Currently, meta attributes are only parsed
in context and minus code.

Signed-off-by: Jaskaran Singh <jaskaran.singh@collabora.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
  | MetaPosDecl of arity * meta_name (* name *)
129
129
  | MetaComDecl of arity * meta_name (* name *)
130
130
  | MetaFmtDecl of arity * meta_name (* name *)
 
131
  | MetaAttributeDecl of arity * meta_name (* name *)
131
132
  | MetaFragListDecl of arity * meta_name (* name *) * list_len (*len*)
132
133
  | MetaAnalysisDecl of string * meta_name (* name *)
133
134
  | MetaDeclarerDecl of arity * meta_name (* name *)
626
627
 
627
628
and base_attr =
628
629
    Attribute of string mcode
 
630
  | MetaAttribute of meta_name mcode * constraints * keep_binding * inherited
629
631
 
630
632
and attr = base_attr wrap
631
633
 
914
916
  | MetaPosDecl(_ar,nm) -> nm
915
917
  | MetaComDecl(_ar,nm) -> nm
916
918
  | MetaFmtDecl(_ar,nm) -> nm
 
919
  | MetaAttributeDecl(_ar,nm) -> nm
917
920
  | MetaFragListDecl(_ar,nm,_nm1) -> nm
918
921
  | MetaAnalysisDecl(_code,nm) -> nm
919
922
  | MetaDeclarerDecl(_ar,nm) -> nm