@ -1140,10 +1140,8 @@ function generateJS(ast, options) {
}
function generateWrapper ( toplevelCode ) {
function generate Intro ( ) {
function generate GeneratedByComment ( ) {
return [
'"use strict";' ,
'' ,
'/*' ,
' * Generated by PEG.js 0.9.0.' ,
' *' ,
@ -1172,8 +1170,9 @@ function generateJS(ast, options) {
var generators = {
bare : function ( ) {
return [
generateGeneratedByComment ( ) ,
'(function() {' ,
indent2 ( generateIntro ( ) ) ,
' "use strict";' ,
'' ,
indent2 ( toplevelCode ) ,
'' ,
@ -1199,6 +1198,7 @@ function generateJS(ast, options) {
params = dependencyVars . join ( ', ' ) ;
parts . push ( [
generateGeneratedByComment ( ) ,
'(function(root, factory) {' ,
' if (typeof define === "function" && define.amd) {' ,
' define(' + dependencies + ', factory);' ,
@ -1216,7 +1216,7 @@ function generateJS(ast, options) {
parts . push ( [
' }' ,
'})(this, function(' + params + ') {' ,
indent2 ( generateIntro ( ) ) ,
' "use strict";' ,
'' ,
indent2 ( toplevelCode ) ,
'' ,