UNPKG

@lcap/nasl-parser

Version:

Take Nasl text to Nasl AST with the help of generalized parsing.

15 lines 549 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = void 0; const nearley_1 = require("nearley"); const nasl_1 = __importDefault(require("./nasl")); const parse = code => { const parser = new nearley_1.Parser(nearley_1.Grammar.fromCompiled(nasl_1.default)); parser.feed(code); return parser; }; exports.parse = parse; //# sourceMappingURL=nasl-parser.js.map