module:process-code :module:process-code~processCode
Parsing code, find all occurrence PubSub event and save in store
- Source:
Methods
(inner) findPubSubName(ast) → {String}
Parse pubsub name for
Parameters:
Name | Type | Description |
---|---|---|
ast |
Object | AST-tree |
- Source:
Returns:
Name of pubsub module
- Type
- String
(inner) parse(node, parent, code, filePath) → {module:process-code.ParsedOccurrence}
Parse occurrence
Parameters:
Name | Type | Description |
---|---|---|
node |
Object | Finded node of occurrence |
parent |
Object | Parent node |
code |
String | Listing of this source code file's |
filePath |
String | Absolute file path to source code |
- Source:
Returns:
(inner) parseEventName(node, code) → {String}
Parse event name
Parameters:
Name | Type | Description |
---|---|---|
node |
Object | First argument of FunctionCall |
code |
String | Listing or source code |
- Source:
Returns:
- Type
- String
(inner) parseSecondArgument(node, code) → {String}
Parse second argument of PubSub.(...)
Parameters:
Name | Type | Description |
---|---|---|
node |
Object | undefined | Second argument, if exist |
code |
String | Listing or source code |
- Source:
Returns:
- Type
- String
(inner) parseSecondArgumentCodeLocation(args, filePath) → {module:process-code.CodeLocation}
Position argumentsCode in listing
Parameters:
Name | Type | Description |
---|---|---|
args |
Array | Arguments node array |
filePath |
String | Absolute path to file contains occurrence code |
- Source:
Returns:
(inner) processCode(code, filePath, store, amdImportopt)
Parsing code, find all occurrence PubSub event and save in store
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
code |
String | Listing of code | |
filePath |
String | Absolute path to listing file | |
store |
module:store~Store | Event occurrence store @see store | |
amdImport |
Boolean |
<optional> |
Preliminary search of importers PubSub with define |
- Source:
Type Definitions
CodeLocation
Location of code occurrence
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
line |
Number | Number of line occurrence code |
column |
Number | Number of column occurrence code |
file |
String | Absolute path to file contains occurrence code |
- Source:
ParsedOccurrence
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
module:types.OccurrenceType | Type of occurrence event |
name |
String | Event name or part of code |
code |
String | Code PubSub second arguments (callback or data argument) |
loc |
module:process-code.CodeLocation | Location of code |
- Source: