Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import defaultParserInterface from '../utils/defaultParserInterface';
import pkg from 'luaparse/package.json';
const ID = 'luaparse';
export default {
...defaultParserInterface,
id: ID,
displayName: ID,
version: `${pkg.version}`,
homepage: pkg.homepage,
locationProps: new Set(['range', 'loc']),
loadParser(callback) {
require(['luaparse'], callback);
},
parse(luaparse, code, options={}) {
return luaparse.parse(code, options);
},
getDefaultOptions() {
return {
ranges: true,
locations: false,
comments: true,