@abaplint/core
Version:
abaplint - Core API
46 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ABAPFile = void 0;
const tokens_1 = require("./1_lexer/tokens");
const _abstract_file_1 = require("../files/_abstract_file");
class ABAPFile extends _abstract_file_1.AbstractFile {
constructor(file, tokens, statements, structure, info) {
super(file.getFilename());
this.file = file;
this.tokens = tokens;
this.statements = statements;
this.structure = structure;
this.info = info;
}
getRaw() {
return this.file.getRaw();
}
getInfo() {
return this.info;
}
getRawRows() {
return this.file.getRawRows();
}
getStructure() {
return this.structure;
}
getTokens(withPragmas = true) {
if (withPragmas === true) {
return this.tokens;
}
else {
const tokens = [];
this.tokens.forEach((t) => {
if (!(t instanceof tokens_1.Pragma)) {
tokens.push(t);
}
});
return tokens;
}
}
getStatements() {
return this.statements;
}
}
exports.ABAPFile = ABAPFile;
//# sourceMappingURL=abap_file.js.map