Mercurial > hg > Papers > 2021 > anatofuz-master
annotate paper/src/IsInterface.pm @ 131:988b3024d685
update
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2021 05:49:37 +0900 |
parents | 88ae1e4d83c6 |
children |
rev | line source |
---|---|
84 | 1 sub isThisFileInterface { |
2 my ($class, $filename) = @_; | |
3 | |
4 open my $fh, '<', $filename; | |
5 my $line = <$fh>; #read top line ex Typedef struct Stack<Type, Impl> { | |
6 | |
7 return 0 unless ($line =~ /typedef struct \w+\s?<.*>([\s\w{]+)/); | |
8 | |
9 my $annotation = $1; | |
10 return 0 if ($annotation =~ /impl/); | |
11 | |
12 return 1; | |
13 } |