Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a32e09d

Browse files
committed
Small fixes
1 parent 8d794f0 commit a32e09d

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

source/core/annotations/ut_annotation_parser.pkb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,10 @@ create or replace package body ut_annotation_parser as
152152
l_proc_comments := l_line || chr(10);
153153
end if;
154154
l_i := l_i + 1;
155-
156155
-- Whitespace-only line: allowed between comment block and proc decl
157-
-- -----------------------------------------------------------------
158156
elsif l_in_comment_block and trim(replace(l_line, chr(9))) is null then
159157
l_i := l_i + 1;
160-
161-
-- -----------------------------------------------------------------
162158
-- procedure/function declaration following a comment block
163-
-- -----------------------------------------------------------------
164159
elsif l_in_comment_block
165160
and regexp_like(l_line, '^\s*(procedure|function)\s+', 'i')
166161
then
@@ -184,16 +179,12 @@ create or replace package body ut_annotation_parser as
184179
l_i := l_i + 1;
185180
end loop;
186181
l_i := l_i + 1; -- step past the ';' line itself
187-
188-
-- -----------------------------------------------------------------
189182
-- Any other line: reset comment block accumulator
190-
-- -----------------------------------------------------------------
191183
else
192184
l_in_comment_block := false;
193-
l_proc_comments := null;
185+
l_proc_comments := null;
194186
l_i := l_i + 1;
195187
end if;
196-
197188
end loop;
198189
end add_procedure_annotations;
199190

source/core/ut_utils.pkb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,9 @@ create or replace package body ut_utils is
675675
l_end binary_integer;
676676
l_token_count binary_integer;
677677
l_has_ml_comment boolean := false;
678+
679+
l_open_chars varchar2(4):= chr(91) || chr(123) || chr(40) || chr(60); -- [{(
680+
l_close_chars varchar2(4):= chr(93) || chr(125) || chr(41) || chr(62); -- ]})>
678681
begin
679682

680683
-- Guard: empty source
@@ -766,10 +769,9 @@ create or replace package body ut_utils is
766769
and (l_comment_start = 0 or l_eq_text_start < l_comment_start)
767770
and (l_text_start = 0 or l_eq_text_start < l_text_start)
768771
then
769-
l_eq_end_char := translate(
770-
substr(l_remaining, l_eq_text_start + 2, 1),
771-
'[{(<', ']})>'
772-
);
772+
773+
774+
l_eq_end_char := translate(substr(l_remaining, l_eq_text_start + 2, 1),l_open_chars,l_close_chars);
773775
l_end := instr(l_remaining, l_eq_end_char || '''', l_eq_text_start + 3);
774776
if l_end > 0 then
775777
l_line := l_line || substr(l_remaining, 1, l_end + 1);

0 commit comments

Comments
 (0)