This file contains hidden or 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
# Floats | |
block: | |
let f = 1.0 | |
echo f.abs | |
# `let`, `var`, `const`, ... | |
block: | |
block: # let |
This file contains hidden or 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
diff --git a/cclox.cc b/cclox.cc | |
index 0e9d3c5..f736492 100644 | |
--- a/cclox.cc | |
+++ b/cclox.cc | |
@@ -59,7 +59,7 @@ struct Value { | |
} | |
- auto copy() -> Value { | |
+ [[nodiscard]] auto copy() const -> Value { |
This file contains hidden or 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
# coc.nvim config only | |
let g:coc_global_extensions = ['coc-clangd', 'coc-tsserver', 'coc-json', 'coc-html', 'coc-css', 'coc-go', 'coc-rust-analyzer'] | |
function! s:CheckBackSpace() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~# '\s' | |
endfunction | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? "\<C-n>" : | |
\ <SID>CheckBackSpace() ? "\<TAB>" : | |
\ coc#refresh() |
This file contains hidden or 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
#include "precomp.h" | |
#include "edit.h" | |
#include "ui.h" | |
// Frame | |
auto Edit::frame() -> void { | |
input(); |
This file contains hidden or 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
#include "precomp.h" | |
#include "archive.h" | |
#include "edit.h" | |
#include "events.h" | |
#include "graphics.h" | |
#include "kernel.h" | |
#include "physics.h" | |
#include "platform.h" | |
#include "timing.h" |
This file contains hidden or 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
// Save / load | |
template<typename F = bool> | |
auto save(Kernel &ker, F &&filter = true) -> void { | |
// Create document | |
using namespace json; | |
Document root; | |
root.SetObject(); | |
auto &alloc = root.GetAllocator(); |
This file contains hidden or 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
#include "precomp.h" | |
#include "events.h" | |
#include "graphics.h" | |
#include "kernel.h" | |
#include "physics.h" | |
#include "platform.h" | |
#include "timing.h" | |
#include "ui.h" |
This file contains hidden or 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
#include "precomp.h" | |
#include "events.h" | |
#include "graphics.h" | |
#include "kernel.h" | |
#include "physics.h" | |
#include "platform.h" | |
#include "timing.h" | |
#include "ui.h" |
This file contains hidden or 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
#include "precomp.h" | |
#include "events.h" | |
#include "graphics.h" | |
#include "kernel.h" | |
#include "physics.h" | |
#include "platform.h" | |
#include "timing.h" | |
#include "ui.h" |
This file contains hidden or 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
#include "precomp.h" | |
#include "events.h" | |
#include "graphics.h" | |
#include "kernel.h" | |
#include "physics.h" | |
#include "platform.h" | |
#include "timing.h" | |
#include "ui.h" |