How to use the luaparse/package.json.homepage function in luaparse

To help you get started, we’ve selected a few luaparse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fkling / astexplorer / website / src / parsers / lua / luaparse.js View on Github external
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,
      scope: false,

luaparse

A Lua parser in JavaScript

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis