mirror of
https://github.com/open-goal/jak-project
synced 2026-06-23 09:29:56 -04:00
53277a65ad
- Integrate the AST into the LSP, this makes parsing and tokenizing the files much easier - Consolidate most of the symbol info tracking in `goalc` to a single map. Fixed some issues where the old map would never evict symbols when re-compiling files. There is still some more to cleanup, but this now can be used as an incrementally updated source-of-truth for the LSP - re-compile files when they are saved. Ideally this would be done everytime they are changed but that: - may be too aggressive - goalc doesn't compile incrementally yet so it likely would be a worse UX Features added, see https://github.com/open-goal/opengoal-vscode/issues/256 - Hover   - LSP Status fixed - Type Hierarchy  - Document Color  - Document Symbols  - Completions  --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
29 lines
1.1 KiB
Bash
Vendored
Generated
29 lines
1.1 KiB
Bash
Vendored
Generated
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Remove quotes, add leading underscores, remove newlines, remove trailing comma.
|
|
EXPORTED_FUNCTIONS=$( \
|
|
cat lib/src/wasm/stdlib-symbols.txt | \
|
|
sed -e 's/"//g' | \
|
|
sed -e 's/^/_/g' | \
|
|
tr -d '\n"' | \
|
|
sed -e 's/,$//' \
|
|
)
|
|
|
|
emcc \
|
|
-o stdlib.wasm \
|
|
-Os \
|
|
--no-entry \
|
|
-s MAIN_MODULE=2 \
|
|
-s "EXPORTED_FUNCTIONS=${EXPORTED_FUNCTIONS}" \
|
|
-s 'ALLOW_MEMORY_GROWTH' \
|
|
-s 'TOTAL_MEMORY=4MB' \
|
|
-fvisibility=hidden \
|
|
-fno-exceptions \
|
|
-xc \
|
|
/dev/null
|
|
|
|
xxd -C -i stdlib.wasm > lib/src/wasm/wasm-stdlib.h
|
|
mv stdlib.wasm target/
|