changeset 194:ee6063379aad

dump_file_at_context
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 23 Jan 2020 09:39:56 +0900
parents 1301727600cc
children 9fb193a2c352
files src/gearsTools/lib/Gears/Util.pm
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gearsTools/lib/Gears/Util.pm	Wed Jan 22 21:56:18 2020 +0900
+++ b/src/gearsTools/lib/Gears/Util.pm	Thu Jan 23 09:39:56 2020 +0900
@@ -40,6 +40,7 @@
 sub _parse_base {
   my ($file,$code_verbose) = @_;
   my $ir  = {};
+  $ir->{file_name} = $file;
 
   Gears::Util->file_checking($file);
   open my $fh, '<', $file;
@@ -153,10 +154,10 @@
 
 sub h2context_str {
   my ($class, $h2context) = @_;
-  my $context = '';
   my $space = '    ';
 
-  $context =  "${space}struct $h2context->{name} {\n";
+  my $context = "${space}//$h2context->{file_name}\n";
+  $context .=  "${space}struct $h2context->{name} {\n";
   my $content_space;
   if (exists $h2context->{content}){
     my @chars = split //, $h2context->{content}->[0];