From 5380cf48b3cdec9cd6b4ff9f18d2770f0418faba Mon Sep 17 00:00:00 2001 From: Tobias Nielsen Date: Mon, 21 Jul 2008 07:39:32 +0200 Subject: [PATCH] Did some syntactical updates --- src/code_gen/test.pl | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) mode change 100644 => 100755 src/code_gen/test.pl diff --git a/src/code_gen/test.pl b/src/code_gen/test.pl old mode 100644 new mode 100755 index 252b9bb..3abfbe3 --- a/src/code_gen/test.pl +++ b/src/code_gen/test.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +use strict: + my @classes = (); my $cClass = 0; my $lastComments = (); @@ -26,19 +28,20 @@ sub loadFile sub parseCommand { my ($cmd, $line) = @_; + parseCreateClass ($line) if $cmd eq "CC"; - push (@{$cClass->{ PUBLIC_CTOR }}, parseCreateConstructor ($line)) if $cmd eq "CTOR+"; - push (@{$cClass->{ PRIVATE_CTOR }}, parseCreateConstructor ($line)) if $cmd eq "CTOR-"; - push (@{$cClass->{ PROTECTED_CTOR }}, parseCreateConstructor ($line)) if $cmd eq "CTOR#"; + push ( @{$cClass->{ PUBLIC_CTOR }}, parseCreateConstructor ($line) ) if $cmd eq "CTOR+"; + push ( @{$cClass->{ PRIVATE_CTOR }}, parseCreateConstructor ($line) ) if $cmd eq "CTOR-"; + push ( @{$cClass->{ PROTECTED_CTOR }}, parseCreateConstructor ($line) ) if $cmd eq "CTOR#"; - push (@{$cClass->{ PUBLIC_FUNCTIONS }}, parseCreateFunction ($line)) if $cmd eq "F+"; - push (@{$cClass->{ PRIVATE_FUNCTIONS }}, parseCreateFunction ($line)) if $cmd eq "F-"; - push (@{$cClass->{ PROTECTED_FUNCTIONS }}, parseCreateFunction ($line)) if $cmd eq "F#"; + push ( @{$cClass->{ PUBLIC_FUNCTIONS }}, parseCreateFunction ($line) ) if $cmd eq "F+"; + push ( @{$cClass->{ PRIVATE_FUNCTIONS }}, parseCreateFunction ($line) ) if $cmd eq "F-"; + push ( @{$cClass->{ PROTECTED_FUNCTIONS }}, parseCreateFunction ($line) ) if $cmd eq "F#"; - push (@{$cClass->{ PUBLIC_ATTRIBUTES }}, parseCreateAttribute ($line)) if $cmd eq "A+"; - push (@{$cClass->{ PRIVATE_ATTRIBUTES }}, parseCreateAttribute ($line)) if $cmd eq "A-"; - push (@{$cClass->{ PROTECTED_ATTRIBUTES }}, parseCreateAttribute ($line)) if $cmd eq "A#"; + push ( @{$cClass->{ PUBLIC_ATTRIBUTES }}, parseCreateAttribute ($line) ) if $cmd eq "A+"; + push ( @{$cClass->{ PRIVATE_ATTRIBUTES }}, parseCreateAttribute ($line) ) if $cmd eq "A-"; + push ( @{$cClass->{ PROTECTED_ATTRIBUTES }}, parseCreateAttribute ($line) ) if $cmd eq "A#"; } -- 2.11.4.GIT