Skip to content

Commit

Permalink
Redundant qrpglesrc messages in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-ogon committed Dec 11, 2024
1 parent 8cff2b7 commit cec46c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions language/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default class Parser {
if (line.trim().startsWith(`//`)) return; // Likely comment

const upperLine = line.toUpperCase();
const firstComment = upperLine.indexOf(`//`);
let comment = -1;

let directivePosition = upperLine.indexOf(`/COPY `);
Expand All @@ -143,6 +144,11 @@ export default class Parser {
directiveLength = 9
};

// If comment is before directive, then it's a comment
if (firstComment >= 0 && firstComment < directivePosition) {
return;
}

/** @type {string|undefined} */
let directiveValue;

Expand Down

0 comments on commit cec46c4

Please sign in to comment.