mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-05 20:26:53 +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);
|
||||
}
|
||||
|
||||
pre:first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* BASIC LAYOUT STYLES */
|
||||
/*****************************************************************************/
|
||||
|
12
docs/static/css/home.css
vendored
12
docs/static/css/home.css
vendored
@ -15,6 +15,14 @@
|
||||
--fs-footer: 13px;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-padding-top: var(--navbar-height);
|
||||
}
|
||||
|
||||
pre:first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #F6F8F8;
|
||||
}
|
||||
@ -26,10 +34,6 @@ p {
|
||||
letter-spacing: .6px;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-padding-top: var(--navbar-height);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* BASIC LAYOUT */
|
||||
/*****************************************************************************/
|
||||
|
4
docs/static/css/style.css
vendored
4
docs/static/css/style.css
vendored
@ -34,10 +34,6 @@
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
pre:first-line {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
code, code span,
|
||||
.code, .code span {
|
||||
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 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 30px;
|
||||
color: white;
|
||||
@ -52,6 +51,14 @@ body {
|
||||
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 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -69,11 +76,6 @@ body {
|
||||
color: var(--color-toolbar-bg);
|
||||
}
|
||||
|
||||
#code-example-titles {
|
||||
color: var(--color-code-example-title);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.code-example-title {
|
||||
cursor: pointer;
|
||||
padding: 20px 10px;
|
||||
@ -140,6 +142,7 @@ body {
|
||||
@media screen and (max-width: 995px) {
|
||||
:root {
|
||||
--fs-code-example-title: 10px;
|
||||
--fs-editor: 14px;
|
||||
}
|
||||
|
||||
#code-area {
|
||||
|
2
docs/templates/try-online.html
vendored
2
docs/templates/try-online.html
vendored
@ -49,7 +49,7 @@
|
||||
<!-- The Code Editor. -->
|
||||
<div id="code-area">
|
||||
<div id="code-editor" class="code language-ruby"></div>
|
||||
<p id="code-output" class="code"></p>
|
||||
<pre id="code-output" class="code"></pre>
|
||||
</div>
|
||||
|
||||
<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
|
||||
// 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)) {
|
||||
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
|
||||
// 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