diff --git a/Units/parser-ada.r/ada-is-end.d/args.ctags b/Units/parser-ada.r/ada-is-end.d/args.ctags new file mode 100644 index 0000000000..5ee5f79f70 --- /dev/null +++ b/Units/parser-ada.r/ada-is-end.d/args.ctags @@ -0,0 +1 @@ +--sort=no diff --git a/Units/parser-ada.r/ada-is-end.d/expected.tags b/Units/parser-ada.r/ada-is-end.d/expected.tags new file mode 100644 index 0000000000..f8469660bb --- /dev/null +++ b/Units/parser-ada.r/ada-is-end.d/expected.tags @@ -0,0 +1 @@ +Seg_Fault_Example input.ada /^procedure Seg_Fault_Example is$/;" r diff --git a/Units/parser-ada.r/ada-is-end.d/input.ada b/Units/parser-ada.r/ada-is-end.d/input.ada new file mode 100644 index 0000000000..97b24e7ae3 --- /dev/null +++ b/Units/parser-ada.r/ada-is-end.d/input.ada @@ -0,0 +1,4 @@ +with Ada.Text_IO; + +procedure Seg_Fault_Example is + diff --git a/parsers/ada.c b/parsers/ada.c index def6355b61..88a933af99 100644 --- a/parsers/ada.c +++ b/parsers/ada.c @@ -1173,7 +1173,7 @@ static adaTokenInfo *adaParseSubprogram (adaTokenInfo *parent, adaKind kind) /* if this is a "new" something then no need to parse */ skipPast (";"); } - else if (line[pos] == '(') + else if (!eof_reached && line[pos] == '(') { /* '(' is the starter of an expression function. */ skipPast (";");