From 36d9d13a20e44076e35d08a103004dd0f5e61401 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 Sep 2018 13:51:06 +0100 Subject: [PATCH] auditor wip semiparse seems to work ish --- i18n-diff-auditor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i18n-diff-auditor b/i18n-diff-auditor index 8252c3f..d1ae6f1 100755 --- a/i18n-diff-auditor +++ b/i18n-diff-auditor @@ -98,7 +98,7 @@ sub semiparse ($) { my @o; for (;;) { s{^\s+}{}; - if (s{^[\$\@\%][_0-9a-zA-Z]+}{}) { + if (s{^[\$\@\%]?[_0-9a-zA-Z]+}{}) { push @o, { T => 'ident', L => $& }; } elsif (s{^\<\<('?)([A-Z_]+)\1}{}) { my ($q,$d) = ($1,$2); @@ -124,6 +124,7 @@ sub semiparse ($) { die "cannot tokenise \`$&'"; } } + return @o; } sub analyse_chunk () { -- 2.30.2