/*global exports:true module:true require:true define:true global:true */
(function (root, name, factory) {
'use strict';
var freeExports = typeof exports === 'object' && exports
// While CommonJS defines `module` as an object, component define it as a
// function
, freeModule = (typeof module === 'object' || typeof module === 'function') &&
module && module.exports === freeExports && module;
// Detect free variable `global`, from Node.js or Browserified code, and use
// it as `root`
var freeGlobal = typeof global === 'object' && global;
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)
root = freeGlobal;
// Some AMD build optimizers, like r.js, check for specific condition
// patterns like the following:
if (typeof define === 'function' && define.amd) {
define(['exports'], factory);
}
// check for `exports` after `define` in case a build optimizer adds an
// `exports` object
else if (freeExports && !freeExports.nodeType) {
// in Node.js or RingoJS v0.8.0+
if (freeModule) factory(freeModule.exports);
// in Narwhal or RingoJS v0.7.0-
else factory(freeExports);
}
// in a browser or Rhino
else {
factory((root[name] = {}));
}
}(this, 'luaparse', function (exports) {
'use strict';
exports.version = '0.1.4';
var input, options, length;
// Options can be set either globally on the parser object through
// defaultOptions, or during the parse call.
var defaultOptions = exports.defaultOptions = {
// Explicitly tell the parser when the input ends.
wait: false
// Store comments as an array in the chunk object.
, comments: true
// Track identifier scopes by adding an isLocal attribute to each
// identifier-node.
, scope: false
// Store location information on each syntax node as
// `loc: { start: { line, column }, end: { line, column } }`.
, locations: false
// Store the start and end character locations on...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.