UNPKG

eggtended-js

Version:

A extended version of the Egg programming language from the Eloquent Javascript book.

294 lines (284 loc) 24.2 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href> <title data-ice="title">Source | eggtended-js</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> <meta name="description" content="An extended version of the Egg programming language"><meta property="og:type" content="website"><meta property="og:url" content="http://my-library.org"><meta property="og:site_name" content="eggtended-js"><meta property="og:title" content="eggtended-js"><meta property="og:image" content="https://i.imgur.com/9N4qe98.png"><meta property="og:description" content="An extended version of the Egg programming language"><meta property="og:author" content="https://github.com/Dibad"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="eggtended-js"><meta property="twitter:description" content="An extended version of the Egg programming language"><meta property="twitter:image" content="https://i.imgur.com/9N4qe98.png"></head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <a href="test.html" data-ice="testLink">Test</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> <a style="position:relative; top:3px;" href="https://github.com/Dibad/eggtended-js"><img width="20px" src="./image/github.png"></a></header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-checkIterable">checkIterable</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-chunk">chunk</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getValidIndex">getValidIndex</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ins">ins</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#interp">interp</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/ast.js~Apply.html">Apply</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/ast.js~Regex.html">Regex</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/ast.js~Value.html">Value</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/ast.js~Word.html">Word</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/eggvm.js~Eggvm.html">Eggvm</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/interp/symboltable.js~SymbolTable.html">SymbolTable</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-SpecialForms">SpecialForms</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-TopEnv">TopEnv</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#parser">parser</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/parser/lexer.js~Lexer.html">Lexer</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/parser/parse.js~Parser.html">Parser</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/parser/tokenRegex.js~TokenRegex.html">TokenRegex</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-json2AST">json2AST</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-COMMA">COMMA</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-LP">LP</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-NEWLINE">NEWLINE</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-NUMBER">NUMBER</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-REGEX">REGEX</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-RP">RP</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-STRING">STRING</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-WHITES">WHITES</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-WORD">WORD</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#repl">repl</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-eggCompleter">eggCompleter</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getPromptLine">getPromptLine</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-repl">repl</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-BLUE">BLUE</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-DEFAULT">DEFAULT</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-GREEN">GREEN</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-RED">RED</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-YELLOW">YELLOW</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggClear">eggClear</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggExit">eggExit</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggHelp">eggHelp</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggInfo">eggInfo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggRun">eggRun</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-eggVersion">eggVersion</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><h1>Source <img data-ice="coverageBadge" src="./badge.svg"><span data-ice="totalCoverageCount" class="total-coverage-count">2/109</span></h1> <table class="files-summary" data-ice="files" data-use-coverage="true"> <thead> <tr> <td>File</td> <td>Identifier</td> <td class="coverage">Document</td> <td style="display: none;">Size</td> <td style="display: none;">Lines</td> <td style="display: none;">Updated</td> </tr> </thead> <tbody> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/arithm.js.html#errorLines=41">lib/interp/arithm.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/1</span></td> <td style="display: none;" data-ice="size">1071 byte</td> <td style="display: none;" data-ice="lines">48</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/ast.js.html#errorLines=10,104,105,106,108,109,112,13,18,19,20,21,24,38,39,40,41,42,45,7,8,9">lib/interp/ast.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="class/lib/interp/ast.js~Apply.html">Apply</a></span> <span><a href="class/lib/interp/ast.js~Regex.html">Regex</a></span> <span><a href="class/lib/interp/ast.js~Value.html">Value</a></span> <span><a href="class/lib/interp/ast.js~Word.html">Word</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/22</span></td> <td style="display: none;" data-ice="size">2791 byte</td> <td style="display: none;" data-ice="lines">122</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/eggvm.js.html#errorLines=14,15,21,27,36,45">lib/interp/eggvm.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="class/lib/interp/eggvm.js~Eggvm.html">Eggvm</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/6</span></td> <td style="display: none;" data-ice="size">1209 byte</td> <td style="display: none;" data-ice="lines">56</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/environment.js.html">lib/interp/environment.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">107 byte</td> <td style="display: none;" data-ice="lines">6</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/exceptions.js.html">lib/interp/exceptions.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">534 byte</td> <td style="display: none;" data-ice="lines">29</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/index.js.html">lib/interp/index.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">166 byte</td> <td style="display: none;" data-ice="lines">10</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/monkey-patching.js.html#errorLines=31,4">lib/interp/monkey-patching.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/2</span></td> <td style="display: none;" data-ice="size">1303 byte</td> <td style="display: none;" data-ice="lines">64</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/registry.js.html#errorLines=8,9">lib/interp/registry.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="variable/index.html#static-variable-SpecialForms">SpecialForms</a></span> <span><a href="variable/index.html#static-variable-TopEnv">TopEnv</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/2</span></td> <td style="display: none;" data-ice="size">6231 byte</td> <td style="display: none;" data-ice="lines">271</td> <td style="display: none;" data-ice="updated">2019-05-05 20:44:24 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/require.js.html">lib/interp/require.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">619 byte</td> <td style="display: none;" data-ice="lines">22</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/symboltable.js.html#errorLines=1,10,2,4">lib/interp/symboltable.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="class/lib/interp/symboltable.js~SymbolTable.html">SymbolTable</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/4</span></td> <td style="display: none;" data-ice="size">332 byte</td> <td style="display: none;" data-ice="lines">21</td> <td style="display: none;" data-ice="updated">2019-05-05 20:44:26 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/interp/typing.js.html">lib/interp/typing.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">1039 byte</td> <td style="display: none;" data-ice="lines">39</td> <td style="display: none;" data-ice="updated">2019-05-05 20:56:33 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/parser/index.js.html">lib/parser/index.js</a></span></td> <td data-ice="identifier" class="identifiers">-</td> <td class="coverage"><span data-ice="coverage">-</span></td> <td style="display: none;" data-ice="size">248 byte</td> <td style="display: none;" data-ice="lines">11</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/parser/json2AST.js.html#errorLines=4">lib/parser/json2AST.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="function/index.html#static-function-json2AST">json2AST</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/1</span></td> <td style="display: none;" data-ice="size">710 byte</td> <td style="display: none;" data-ice="lines">29</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/parser/lexer.js.html#errorLines=10,106,11,142,19,25,29,35,39,4,43,5,59,6,7,72">lib/parser/lexer.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="class/lib/parser/lexer.js~Lexer.html">Lexer</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/16</span></td> <td style="display: none;" data-ice="size">3529 byte</td> <td style="display: none;" data-ice="lines">166</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/parser/parse.js.html#errorLines=117,123,15,16,17,20,21,30,51,55,61,65,84">lib/parser/parse.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="class/lib/parser/parse.js~Parser.html">Parser</a></span></td> <td class="coverage"><span data-ice="coverage">13 %</span><span data-ice="coverageCount" class="coverage-count">2/15</span></td> <td style="display: none;" data-ice="size">3286 byte</td> <td style="display: none;" data-ice="lines">137</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/parser/tokenRegex.js.html#errorLines=103,111,13,17,23,3,38,4,47,5,56,6,63,73,80,89,9,96">lib/parser/tokenRegex.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="variable/index.html#static-variable-COMMA">COMMA</a></span> <span><a href="variable/index.html#static-variable-LP">LP</a></span> <span><a href="variable/index.html#static-variable-NEWLINE">NEWLINE</a></span> <span><a href="variable/index.html#static-variable-NUMBER">NUMBER</a></span> <span><a href="variable/index.html#static-variable-REGEX">REGEX</a></span> <span><a href="variable/index.html#static-variable-RP">RP</a></span> <span><a href="variable/index.html#static-variable-STRING">STRING</a></span> <span><a href="class/lib/parser/tokenRegex.js~TokenRegex.html">TokenRegex</a></span> <span><a href="variable/index.html#static-variable-WHITES">WHITES</a></span> <span><a href="variable/index.html#static-variable-WORD">WORD</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/18</span></td> <td style="display: none;" data-ice="size">2709 byte</td> <td style="display: none;" data-ice="lines">130</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/repl/colors.js.html#errorLines=4,5,6,7,8">lib/repl/colors.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="variable/index.html#static-variable-BLUE">BLUE</a></span> <span><a href="variable/index.html#static-variable-DEFAULT">DEFAULT</a></span> <span><a href="variable/index.html#static-variable-GREEN">GREEN</a></span> <span><a href="variable/index.html#static-variable-RED">RED</a></span> <span><a href="variable/index.html#static-variable-YELLOW">YELLOW</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/5</span></td> <td style="display: none;" data-ice="size">456 byte</td> <td style="display: none;" data-ice="lines">18</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/repl/extensions.js.html#errorLines=102,122,14,20,25,32,41,60,65,69,77,90">lib/repl/extensions.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="variable/index.html#static-variable-eggClear">eggClear</a></span> <span><a href="function/index.html#static-function-eggCompleter">eggCompleter</a></span> <span><a href="variable/index.html#static-variable-eggExit">eggExit</a></span> <span><a href="variable/index.html#static-variable-eggHelp">eggHelp</a></span> <span><a href="variable/index.html#static-variable-eggInfo">eggInfo</a></span> <span><a href="variable/index.html#static-variable-eggRun">eggRun</a></span> <span><a href="variable/index.html#static-variable-eggVersion">eggVersion</a></span> <span><a href="function/index.html#static-function-getPromptLine">getPromptLine</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/12</span></td> <td style="display: none;" data-ice="size">3131 byte</td> <td style="display: none;" data-ice="lines">137</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/repl/repl.js.html#errorLines=12">lib/repl/repl.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="function/index.html#static-function-repl">repl</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/1</span></td> <td style="display: none;" data-ice="size">1743 byte</td> <td style="display: none;" data-ice="lines">75</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> <tr data-ice="file"> <td data-ice="filePath"><span><a href="file/lib/utils.js.html#errorLines=11,21,3,5">lib/utils.js</a></span></td> <td data-ice="identifier" class="identifiers"><span><a href="function/index.html#static-function-checkIterable">checkIterable</a></span> <span><a href="function/index.html#static-function-chunk">chunk</a></span> <span><a href="function/index.html#static-function-getValidIndex">getValidIndex</a></span> <span><a href="function/index.html#static-function-ins">ins</a></span></td> <td class="coverage"><span data-ice="coverage">0 %</span><span data-ice="coverageCount" class="coverage-count">0/4</span></td> <td style="display: none;" data-ice="size">798 byte</td> <td style="display: none;" data-ice="lines">38</td> <td style="display: none;" data-ice="updated">2019-05-05 19:55:45 (UTC)</td> </tr> </tbody> </table> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>