Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMD module generator should be able to define dependencies #202

Merged
merged 6 commits into from
Feb 16, 2014
2 changes: 1 addition & 1 deletion lib/jison.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ lrGeneratorMixin.generate = function parser_generate (opt) {

lrGeneratorMixin.generateAMDModule = function generateAMDModule(opt){
opt = typal.mix.call({}, this.options, opt);
var out = '\n\ndefine([], function(){'
var out = '\n\ndefine(function(require){'
+ '\nvar parser = '+ this.generateModule_(opt)
+ "\n"+this.moduleInclude
+ (this.lexer && this.lexer.generateModule ?
Expand Down
2 changes: 1 addition & 1 deletion tests/parser/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports["test amd module generator"] = function() {

var parserSource = gen.generateAMDModule();
var parser = null,
define = function(deps, callback){
define = function(callback){
// temporary AMD-style define function, for testing.
parser = callback();
};
Expand Down