123456789101112131415161718192021222324252627282930313233343536373839(* Yoann Padioleau
*
* Copyright (C) 2012 Facebook
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation, with the
* special exception on linking described in file license.txt.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
* license.txt for more details.
*)openCommon(*****************************************************************************)(* Prelude *)(*****************************************************************************)(* A few types and helpers related to comment analysis.
*
* less: at one point we should parse more the comment and have
* tokens such as TWord, TAnnot, etc. as in CComment.
*
*)(*****************************************************************************)(* Helpers *)(*****************************************************************************)(* Copy paste of Comment_php.strip_comment_marks for now.
* less: factorize and put stuff in a h_program-lang/comment.ml file
*)letstrip_comment_markss=match()with|_whens=~"^//[ ]*\\(.*\\)"->Common.matched1s|_whens=~"^[ *]*\\(.*\\)"->Common.matched1s|_->s