From 006ea8fde89f4d1c06123e3f1a5b5a648a7e297a Mon Sep 17 00:00:00 2001 From: worksofliam Date: Wed, 11 Dec 2024 11:49:05 -0500 Subject: [PATCH] Add missing C spec indicator Signed-off-by: worksofliam --- language/models/fixed.js | 2 ++ language/parser.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/language/models/fixed.js b/language/models/fixed.js index 62be4a36..d045a0ef 100644 --- a/language/models/fixed.js +++ b/language/models/fixed.js @@ -53,6 +53,7 @@ export function parseFLine(line) { */ export function parseCLine(lineNumber, lineIndex, content) { content = content.padEnd(80); + const indicator = content.substr(9, 11); const factor1 = content.substr(11, 14); const opcode = content.substr(25, 10).toUpperCase(); const factor2 = content.substr(35, 14); @@ -64,6 +65,7 @@ export function parseCLine(lineNumber, lineIndex, content) { const ind3 = content.substr(74, 2); return { + indicator: calculateToken(lineNumber, lineIndex+9, indicator, `special-ind`), opcode: calculateToken(lineNumber, lineIndex+25, opcode, `opcode`), factor1: calculateToken(lineNumber, lineIndex+11, factor1), factor2: calculateToken(lineNumber, lineIndex+35, factor2), diff --git a/language/parser.ts b/language/parser.ts index edd2c307..0bf5500c 100644 --- a/language/parser.ts +++ b/language/parser.ts @@ -1284,7 +1284,7 @@ export default class Parser { case `C`: const cSpec = parseCLine(lineNumber, lineIndex, line); - tokens = [cSpec.ind1, cSpec.ind2, cSpec.ind3]; + tokens = [cSpec.indicator, cSpec.ind1, cSpec.ind2, cSpec.ind3]; const fromToken = (token?: Token) => { return token ? lineTokens(token.value, lineNumber, token.range.start) : [];