mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-11 07:00:58 +08:00
false positive assertion crash -- fixed
This commit is contained in:
parent
adcd7dce45
commit
dfd1c5a612
4
docs/static/css/docs.css
vendored
4
docs/static/css/docs.css
vendored
@ -38,6 +38,10 @@ html {
|
|||||||
scroll-padding-top: var(--navbar-height);
|
scroll-padding-top: var(--navbar-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre:first-line {
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* BASIC LAYOUT STYLES */
|
/* BASIC LAYOUT STYLES */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
12
docs/static/css/home.css
vendored
12
docs/static/css/home.css
vendored
@ -15,6 +15,14 @@
|
|||||||
--fs-footer: 13px;
|
--fs-footer: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
scroll-padding-top: var(--navbar-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
pre:first-line {
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #F6F8F8;
|
background-color: #F6F8F8;
|
||||||
}
|
}
|
||||||
@ -26,10 +34,6 @@ p {
|
|||||||
letter-spacing: .6px;
|
letter-spacing: .6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
|
||||||
scroll-padding-top: var(--navbar-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* BASIC LAYOUT */
|
/* BASIC LAYOUT */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
4
docs/static/css/style.css
vendored
4
docs/static/css/style.css
vendored
@ -34,10 +34,6 @@
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre:first-line {
|
|
||||||
line-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
code, code span,
|
code, code span,
|
||||||
.code, .code span {
|
.code, .code span {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
|
15
docs/static/css/try_online.css
vendored
15
docs/static/css/try_online.css
vendored
@ -43,7 +43,6 @@ body {
|
|||||||
|
|
||||||
#toolbar {
|
#toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
color: white;
|
color: white;
|
||||||
@ -52,6 +51,14 @@ body {
|
|||||||
border-bottom: 2px solid var(--color-toolbar-border);
|
border-bottom: 2px solid var(--color-toolbar-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#code-example-titles {
|
||||||
|
white-space: nowrap;
|
||||||
|
color: var(--color-code-example-title);
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
#run-button {
|
#run-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -69,11 +76,6 @@ body {
|
|||||||
color: var(--color-toolbar-bg);
|
color: var(--color-toolbar-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#code-example-titles {
|
|
||||||
color: var(--color-code-example-title);
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-example-title {
|
.code-example-title {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 20px 10px;
|
padding: 20px 10px;
|
||||||
@ -140,6 +142,7 @@ body {
|
|||||||
@media screen and (max-width: 995px) {
|
@media screen and (max-width: 995px) {
|
||||||
:root {
|
:root {
|
||||||
--fs-code-example-title: 10px;
|
--fs-code-example-title: 10px;
|
||||||
|
--fs-editor: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#code-area {
|
#code-area {
|
||||||
|
2
docs/templates/try-online.html
vendored
2
docs/templates/try-online.html
vendored
@ -49,7 +49,7 @@
|
|||||||
<!-- The Code Editor. -->
|
<!-- The Code Editor. -->
|
||||||
<div id="code-area">
|
<div id="code-area">
|
||||||
<div id="code-editor" class="code language-ruby"></div>
|
<div id="code-editor" class="code language-ruby"></div>
|
||||||
<p id="code-output" class="code"></p>
|
<pre id="code-output" class="code"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script async type="text/javascript" src="{{ STATIC_DIR }}wasm/pocketlang.js"></script>
|
<script async type="text/javascript" src="{{ STATIC_DIR }}wasm/pocketlang.js"></script>
|
||||||
|
@ -2894,7 +2894,7 @@ static void compileTopLevelStatement(Compiler* compiler) {
|
|||||||
|
|
||||||
// At the top level the stack size should be 0, before and after compiling
|
// At the top level the stack size should be 0, before and after compiling
|
||||||
// a top level statement, since there aren't any locals at the top level.
|
// a top level statement, since there aren't any locals at the top level.
|
||||||
ASSERT(compiler->stack_size == 0, OOPS);
|
ASSERT(compiler->has_errors || compiler->stack_size == 0, OOPS);
|
||||||
|
|
||||||
if (match(compiler, TK_CLASS)) {
|
if (match(compiler, TK_CLASS)) {
|
||||||
compileClass(compiler);
|
compileClass(compiler);
|
||||||
@ -2921,7 +2921,7 @@ static void compileTopLevelStatement(Compiler* compiler) {
|
|||||||
|
|
||||||
// At the top level the stack size should be 0, before and after compiling
|
// At the top level the stack size should be 0, before and after compiling
|
||||||
// a top level statement, since there aren't any locals at the top level.
|
// a top level statement, since there aren't any locals at the top level.
|
||||||
ASSERT(compiler->stack_size == 0, OOPS);
|
ASSERT(compiler->has_errors || compiler->stack_size == 0, OOPS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user