Skip to content

Commit

Permalink
Fix issue #32
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprey committed Aug 24, 2020
1 parent 3b6a341 commit 2844cb3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/v3/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ class Parser extends EventEmitter {
if (expressionNode.type === 'CallExpression') {
const callee = expressionNode.callee;

if (expressionNode.arguments) {
this.parseBodyRecursively(expressionNode.arguments, parseContext, level + 1);
}

if (callee.type === 'Identifier' && this.dispatcherNames.indexOf(callee.name) >= 0) {
const eventItem = this.parseEventDeclaration(expressionNode);

Expand All @@ -288,6 +292,10 @@ class Parser extends EventEmitter {
if (node.type === 'CallExpression') {
const callee = node.callee;

if (node.arguments) {
this.parseBodyRecursively(node.arguments, parseContext, level + 1);
}

if (callee.type === 'Identifier' && this.dispatcherNames.includes(callee.name)) {
const eventItem = this.parseEventDeclaration(node);

Expand All @@ -311,6 +319,10 @@ class Parser extends EventEmitter {
if (initNode.type === 'CallExpression') {
const callee = initNode.callee;

if (initNode.arguments) {
this.parseBodyRecursively(initNode.arguments, parseContext, level + 1);
}

if (callee.type === 'Identifier' && this.dispatcherConstructorNames.includes(callee.name)) {
this.dispatcherNames.push(variable.name);
}
Expand Down Expand Up @@ -354,6 +366,10 @@ class Parser extends EventEmitter {
if (initNode.type === 'CallExpression') {
const callee = initNode.callee;

if (initNode.arguments) {
this.parseBodyRecursively(initNode.arguments, parseContext, level + 1);
}

if (callee.type === 'Identifier' && this.dispatcherConstructorNames.includes(callee.name)) {
this.dispatcherNames.push(variable.name);
}
Expand Down

0 comments on commit 2844cb3

Please sign in to comment.