From e62831f9e980e297ba9655f57981de5634e40bfd Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Tue, 13 Feb 2024 15:22:01 -0800 Subject: [PATCH] Removed QUALIFIED push for extname. Moved LIKEREC/DS outside for loop --- language/parser.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/language/parser.js b/language/parser.js index 8c3c8c89..a874cfbf 100644 --- a/language/parser.js +++ b/language/parser.js @@ -276,9 +276,6 @@ export default class Parser { } if ([`EXTNAME`].includes(tag)) { - if (!ds.keywords.includes(`QUALIFIED`)) - ds.keywords.push(`QUALIFIED`); - // Fetch from external definitions const recordFormats = await this.fetchTable(keywordValue, ds.keywords.length.toString(), ds.keywords.includes(`ALIAS`)); @@ -298,15 +295,15 @@ export default class Parser { } } else { + // We need to add qualified as it is qualified by default. + if (!ds.keywords.includes(`QUALIFIED`)) + ds.keywords.push(`QUALIFIED`); + // Fetch from local definitions for (let i = scopes.length - 1; i >= 0; i--) { const valuePointer = scopes[i].structs.find(struct => struct.name.toUpperCase() === keywordValue); if (valuePointer) { ds.subItems = valuePointer.subItems; - - // We need to add qualified as it is qualified by default. - if (!ds.keywords.includes(`QUALIFIED`)) - ds.keywords.push(`QUALIFIED`); return; } }