diff --git a/docs/static/css/docs.css b/docs/static/css/docs.css index 3a3dc6d..54d6473 100644 --- a/docs/static/css/docs.css +++ b/docs/static/css/docs.css @@ -38,6 +38,10 @@ html { scroll-padding-top: var(--navbar-height); } +pre:first-line { + line-height: 0; +} + /*****************************************************************************/ /* BASIC LAYOUT STYLES */ /*****************************************************************************/ diff --git a/docs/static/css/home.css b/docs/static/css/home.css index 9ea05c3..cc270c1 100644 --- a/docs/static/css/home.css +++ b/docs/static/css/home.css @@ -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 */ /*****************************************************************************/ diff --git a/docs/static/css/style.css b/docs/static/css/style.css index 686267c..7a9b39d 100644 --- a/docs/static/css/style.css +++ b/docs/static/css/style.css @@ -34,10 +34,6 @@ color: inherit; } -pre:first-line { - line-height: 0; -} - code, code span, .code, .code span { font-family: var(--font-mono); diff --git a/docs/static/css/try_online.css b/docs/static/css/try_online.css index 363f514..e055aa0 100644 --- a/docs/static/css/try_online.css +++ b/docs/static/css/try_online.css @@ -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 { diff --git a/docs/templates/try-online.html b/docs/templates/try-online.html index 004e335..f3f00c9 100644 --- a/docs/templates/try-online.html +++ b/docs/templates/try-online.html @@ -49,7 +49,7 @@
-

+

   
diff --git a/src/pk_compiler.c b/src/pk_compiler.c index f3da90a..99e9150 100644 --- a/src/pk_compiler.c +++ b/src/pk_compiler.c @@ -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); }