@abaplint/core
Version:
abaplint - Core API
44 lines • 2.56 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Controls = void 0;
const Expressions = require("../../2_statements/expressions");
const _typed_identifier_1 = require("../../types/_typed_identifier");
const basic_1 = require("../../types/basic");
class Controls {
runSyntax(node, input) {
const name = node.findDirectExpression(Expressions.NamespaceSimpleName);
const token = name === null || name === void 0 ? void 0 : name.getFirstToken();
if (node.findDirectTokenByText("TABSTRIP") && token) {
const type = new basic_1.StructureType([{ name: "ACTIVETAB", type: new basic_1.CharacterType(132) }]);
const id = new _typed_identifier_1.TypedIdentifier(token, input.filename, type);
input.scope.addIdentifier(id);
}
if (node.findDirectTokenByText("TABLEVIEW") && token) {
const cols = new basic_1.StructureType([
{ name: "SCREEN", type: new basic_1.CharacterType(1) }, // todo
{ name: "INDEX", type: basic_1.IntegerType.get() },
{ name: "SELECTED", type: new basic_1.CharacterType(1) },
{ name: "VISLENGTH", type: basic_1.IntegerType.get() },
{ name: "INVISIBLE", type: new basic_1.CharacterType(1) },
]);
const type = new basic_1.StructureType([
{ name: "FIXED_COLS", type: new basic_1.CharacterType(132) },
{ name: "LINES", type: basic_1.IntegerType.get() },
{ name: "TOP_LINE", type: basic_1.IntegerType.get() },
{ name: "CURRENT_LINE", type: basic_1.IntegerType.get() },
{ name: "LEFT_COL", type: basic_1.IntegerType.get() },
{ name: "LINE_SEL_MODE", type: new basic_1.CharacterType(1) },
{ name: "COL_SEL_MODE", type: new basic_1.CharacterType(1) },
{ name: "LINE_SELECTOR", type: new basic_1.CharacterType(1) },
{ name: "H_GRID", type: new basic_1.CharacterType(1) },
{ name: "V_GRID", type: new basic_1.CharacterType(1) },
{ name: "COLS", type: new basic_1.TableType(cols, { withHeader: false, keyType: basic_1.TableKeyType.default }) },
{ name: "INVISIBLE", type: new basic_1.CharacterType(1) },
]);
const id = new _typed_identifier_1.TypedIdentifier(token, input.filename, type);
input.scope.addIdentifier(id);
}
}
}
exports.Controls = Controls;
//# sourceMappingURL=controls.js.map