Skip to content

Commit

Permalink
Merge pull request #157 from gesslar:update-file-resolution
Browse files Browse the repository at this point in the history
Update-file-resolution
  • Loading branch information
gesslar authored Feb 13, 2025
2 parents a924839 + 6d6ceb0 commit 4eba771
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 234 deletions.
35 changes: 35 additions & 0 deletions TODO/The parser has access to BeDoc's core lo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
The parser has access to BeDoc's core logging utilities through `this.log`.
There are four logging functions available:

- `this.log.debug(string[, ...arg])`: Debug messages
```javascript
async parse(file, content) {
this.log.debug("This will only show in debug mode")
}

// [BeDoc] Debug: This will only show in debug mode
```
- `this.log.info(string[, ...arg])`: Informational messages
```javascript
async parse(file, content) {
this.log.info("A wild Happy Fun Ball has appeared.")
}

// [BeDoc] Info: A wild Happy Fun Ball has appeared.
```
- `this.log.warn(string[, ...arg])`: Warning messages
```javascript
async parse(file, content) {
this.log.warn("Do not taunt Happy Fun Ball.")
}

// [BeDoc] Warn: Do not taunt Happy Fun Ball.
```
- `this.log.error(string[, ...arg])`: Error messages
```javascript
async parse(file, content) {
this.log.error("You have been eaten by Happy Fun Ball. 🙀")
}

// [BeDoc] Error: You have been eaten by Happy Fun Ball. 🙀
```
9 changes: 6 additions & 3 deletions examples/config-lpc-to-markdown.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"language": "lpc",
"format": "markdown",
"output": "output/",
"input": ["wip/sample/arrays.c", "wip/sample/base64.c"],
"hooks": "wip/wikitext-hooks.js"
"output": "output/markdown",
"input": [
"examples/source/lpc/arrays.c",
"examples/source/lpc/base64.c"
],
"hooks": "examples/hooks/lpc-wikitext-hooks.js"
}
10 changes: 10 additions & 0 deletions examples/config-lpc-to-markdown.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"language": "lpc",
"format": "markdown",
"output": "examples/output/markdown",
"input": [
"examples/source/lpc/arrays.c",
"examples/source/lpc/base64.c"
],
"hooks": "examples/hooks/lpc-wikitext-hooks.js"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export const actions = [
* This is the action to print structured object to text.
*
* @param {object} module Data coming in from the printer
* @param {string} module.moduleName The module name (base name) of the
* file
* @param {object} module.file The file object representing the file
* being currently being processed
* @param {object[]} module.moduleContent An array of objects containing
* function definitions.
* function definitions prepared by the parser.
* @returns {Promise<object>} The result of the print operations.
*/
async run(module) {
Expand Down
239 changes: 33 additions & 206 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4eba771

Please sign in to comment.