Skip to content

Latest commit

 

History

History
179 lines (108 loc) · 3.7 KB

File metadata and controls

179 lines (108 loc) · 3.7 KB

Table of Contents

Flag if the handler does not call next() in a Restify handler

Meta

  • author: Rajat Kumar

isHandlerFunction

This function checks if the current AST node is a valid sinatra style handler function

Parameters

Returns boolean

handleReturnStmt

This function checks if the current node is a return statement and looks for any call for next() inside it. Returns true if we find a valid call expression

Parameters

Returns boolean

handleNextCallExpression

This function checks if the current node is next() statement Returns true if we find a valid next() expression

Parameters

Returns boolean

handleGenericFnCallExpression

This function checks if the current node is a generalized function statement which is an execution call and looks for any call for next() inside it. Returns true if we find a valid call expression

Parameters

Returns boolean

handleFnCallExpression

This function checks if the current node is an expression statement and has an execution call expression and looks for any call for next() inside it. Returns true if we find a valid call expression

Parameters

Returns boolean

handleIfStatement

This function checks if the current node is an IF Statement and looks for any call for next() inside it. Returns true if we find a valid call expression

Parameters

Returns boolean

handleBlockStatements

This function handles a block of statements looks for any call for next() inside it. Returns true if we find a valid call expression

Parameters

Returns boolean

handleFunctionDeclaration

This function checks if the current node is a function declaration looks for any call for next() inside it. Reports if we found any next() call or not

Parameters

Returns void

handleReturnStatement

This function checks if the current node is a Return statement that returns a restify handler function and then looks for any call for next() inside it. Reports if we found any next() call or not

Parameters

Returns void