Skip to content

Commit

Permalink
Add missing C spec indicator
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Dec 11, 2024
1 parent ee46528 commit 006ea8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions language/models/fixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion language/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) : [];
Expand Down

0 comments on commit 006ea8f

Please sign in to comment.