-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renderer: restructure and extend documentation
- Introduce virtual uCentral class hierarchy - Add documentation for toplevel helper functions Signed-off-by: Jo-Philipp Wich <[email protected]>
- Loading branch information
Showing
2 changed files
with
303 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
/* | ||
* ucode-transpiler.js - JSDoc plugin to naively transpile ucode into JS. | ||
* | ||
* Copyright (C) 2021 Jo-Philipp Wich <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
function skipString(s) { | ||
|
@@ -445,8 +463,6 @@ Transpiler.prototype = { | |
while (true) { | ||
let off = tokens.length; | ||
|
||
this.check_token(tokens, 'comment'); | ||
|
||
if (this.check_token(tokens, 'if')) { | ||
this.skip_paren(tokens); | ||
|
||
|
@@ -594,7 +610,13 @@ Transpiler.prototype = { | |
else if (this.check_token(tokens, '{')) { | ||
this.skip_block(tokens, ['}']); | ||
} | ||
else if (!this.check_token(tokens, 'text')) { | ||
else if (this.check_token(tokens, 'text')) { | ||
/* pass */ | ||
} | ||
else if (this.check_token(tokens, 'comment')) { | ||
/* pass */ | ||
} | ||
else { | ||
this.skip_statement(tokens, ends); | ||
} | ||
|
||
|
Oops, something went wrong.