Skip to content

Commit 66cbbb9

Browse files
committed
Fix playground crash problem
1 parent ee9eeec commit 66cbbb9

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ CMakeCache.txt
4848
.idea/
4949
grammar/test/*
5050
.DS_Store
51+
.vscode/

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-clang-format
3+
rev: v18.1.8
4+
hooks:
5+
- id: clang-format
6+
files: \.(cpp|cc|h)$
7+
args: [-i]

docs/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
source ~/Projects/emsdk/emsdk_env.sh
3-
emcc -std=c++17 -O3 --bind -o native.js -s ALLOW_MEMORY_GROWTH native.cpp
3+
emcc -std=c++17 -O3 --bind -o native.js -s ALLOW_MEMORY_GROWTH -fexceptions native.cpp

docs/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ function parse() {
101101
});
102102
window.setTimeout(() => {
103103
const data = JSON.parse(Module.lint(grammarText, codeText, mode, packrat, startRule));
104-
$('#overlay').css({
105-
'z-index': '-1',
106-
'display': 'none',
107-
'background-color': 'rgba(1, 1, 1, 1.0)'
108-
});
104+
$('#overlay').css({
105+
'z-index': '-1',
106+
'display': 'none',
107+
'background-color': 'rgba(1, 1, 1, 1.0)'
108+
});
109109

110110
if (data.grammar_valid) {
111111
$grammarValidation.removeClass('validation-invalid').show();

docs/native.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/native.wasm

149 KB
Binary file not shown.

0 commit comments

Comments
 (0)